diff --git a/projects/headless/main.zig b/projects/headless/main.zig index d6828ee..d105293 100644 --- a/projects/headless/main.zig +++ b/projects/headless/main.zig @@ -19,7 +19,7 @@ pub fn prepare(self: *@This()) !void { _ = i; const e = try core.createEntity(); const x = e.addComponent(core.Scene).?; - _ = x; + x.setMobility(.moveable); } // try self.testThing(); @@ -31,7 +31,7 @@ pub fn tick(self: *@This(), dt: f64) void { const start = core.getEngineTime(); - core.parallelJob(UpdateWorldTransformsJob{}, false, 1) catch unreachable; + core.parallelJob(UpdateWorldTransformsJob{}, false, 10) catch unreachable; // wait 10 ms while (core.getEngineTime() - start < 0.010) { @@ -146,6 +146,8 @@ const UpdateWorldTransformsJob = struct { pub fn updateTransformsHierarchy(self: @This(), thread: *core.ThreadContext, outputs: *std.ArrayList(core.math.Transform), outputList: *std.ArrayList(usize)) !void { _ = outputList; _ = self; + const z = core.tracy.ZoneN(@src(), "updateTransformsHierarchy"); + defer z.End(); //const dense = self.world.denseScenes(); const densePosRot = core.Scene.SceneObjectContainer.denseItems(.posRot); @@ -157,6 +159,8 @@ const UpdateWorldTransformsJob = struct { const locals:[]core.math.Transform = try thread.scratch().alloc(core.math.Transform, split.slice.len); + const z2 = core.tracy.ZoneN(@src(), "WalkAndResolve"); + defer z2.End(); for (split.slice, 0..) |posRot, i| { const index = split.startIndex + i; _ = index;