Hello, I'm new to zig and don't have a PR, but here's my findings on what need to be changed
- Allocator now is object itself, not pointer
1.1. Replace declarations allocator: *Allocator with allocator: Allocator
1.2. Replace usage &allocator.allocator with allocator.allocator()
There are cases with ?Allocator, I'm not sure if that's valid.
- Mutex is now locking itself, doesn't return held object
2.1. Replace declarations: held: blabla @TypeOf(std.Thread.Mutex.acquire)... to mutex: std.Thread.Mutex
2.2. Replace lock held = lock.acquire() to mutex.lock()
2.3. Replace defer held.release() to defer mutex.unlock() and held.release() to mutex.unlock()
c_void changed to anyopaque. Not sure, may be it need to be *allowzero anyopaque.
- There is package in buld.zig that named zlm but refers to zalgebra, not sure if they're interchangable
- Example in README.md somewhat outdated, I have changed some parts according to karts example
5.1. Changed .rotation = Vec3.new(-120.0, -15.0, 0).toRadians() to .rotation = Quat.fromEulerAngle(Vec3.new(-120, -15, 0))
5.2. primitive name need to be asset var cube = try didot_obj.GameObject.createObject(allocator, asset.get("Mesh/Cube"));
asset is referenced as const asset = &app.scene.assetManager;
5.3. usingnamespace @import(...) not working anymore, I ended up with const didot_gfx = @import("didot-graphics"); etc.
- Some deprecated
std.debug.warn changed to std.debug.print
This is where I ended up now. I have trouble building glfw on windows, so I replaced all cImports with https://github.com/JonSnowbd/ZT/ but that's another story.
Hello, I'm new to zig and don't have a PR, but here's my findings on what need to be changed
1.1. Replace declarations
allocator: *Allocatorwithallocator: Allocator1.2. Replace usage
&allocator.allocatorwithallocator.allocator()There are cases with
?Allocator, I'm not sure if that's valid.2.1. Replace declarations:
held: blabla @TypeOf(std.Thread.Mutex.acquire)...tomutex: std.Thread.Mutex2.2. Replace lock
held = lock.acquire()tomutex.lock()2.3. Replace
defer held.release()todefer mutex.unlock()andheld.release()tomutex.unlock()c_voidchanged toanyopaque. Not sure, may be it need to be*allowzero anyopaque.5.1. Changed
.rotation = Vec3.new(-120.0, -15.0, 0).toRadians()to.rotation = Quat.fromEulerAngle(Vec3.new(-120, -15, 0))5.2. primitive name need to be asset
var cube = try didot_obj.GameObject.createObject(allocator, asset.get("Mesh/Cube"));asset is referenced as
const asset = &app.scene.assetManager;5.3.
usingnamespace @import(...)not working anymore, I ended up withconst didot_gfx = @import("didot-graphics");etc.std.debug.warnchanged tostd.debug.printThis is where I ended up now. I have trouble building glfw on windows, so I replaced all cImports with https://github.com/JonSnowbd/ZT/ but that's another story.