updating tracks regarding headless
This commit is contained in:
parent
efc11fcba9
commit
338954aa8a
|
|
@ -19,7 +19,7 @@ pub fn prepare(self: *@This()) !void {
|
||||||
_ = i;
|
_ = i;
|
||||||
const e = try core.createEntity();
|
const e = try core.createEntity();
|
||||||
const x = e.addComponent(core.Scene).?;
|
const x = e.addComponent(core.Scene).?;
|
||||||
_ = x;
|
x.setMobility(.moveable);
|
||||||
}
|
}
|
||||||
|
|
||||||
// try self.testThing();
|
// try self.testThing();
|
||||||
|
|
@ -31,7 +31,7 @@ pub fn tick(self: *@This(), dt: f64) void {
|
||||||
|
|
||||||
const start = core.getEngineTime();
|
const start = core.getEngineTime();
|
||||||
|
|
||||||
core.parallelJob(UpdateWorldTransformsJob{}, false, 1) catch unreachable;
|
core.parallelJob(UpdateWorldTransformsJob{}, false, 10) catch unreachable;
|
||||||
|
|
||||||
// wait 10 ms
|
// wait 10 ms
|
||||||
while (core.getEngineTime() - start < 0.010) {
|
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 {
|
pub fn updateTransformsHierarchy(self: @This(), thread: *core.ThreadContext, outputs: *std.ArrayList(core.math.Transform), outputList: *std.ArrayList(usize)) !void {
|
||||||
_ = outputList;
|
_ = outputList;
|
||||||
_ = self;
|
_ = self;
|
||||||
|
const z = core.tracy.ZoneN(@src(), "updateTransformsHierarchy");
|
||||||
|
defer z.End();
|
||||||
//const dense = self.world.denseScenes();
|
//const dense = self.world.denseScenes();
|
||||||
const densePosRot = core.Scene.SceneObjectContainer.denseItems(.posRot);
|
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 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| {
|
for (split.slice, 0..) |posRot, i| {
|
||||||
const index = split.startIndex + i;
|
const index = split.startIndex + i;
|
||||||
_ = index;
|
_ = index;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue