mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-06 04:16:36 +01:00
Fix flickering with batching
- Call syncPoint before submitting tasks - Reset DrawBuffer even if it has no vertices when drawing
This commit is contained in:
parent
8bea467409
commit
d3c280d298
2 changed files with 4 additions and 1 deletions
|
@ -53,8 +53,9 @@ public class BatchingDrawTracker {
|
|||
BufferBuilderExtension scratch = (BufferBuilderExtension) this.scratch;
|
||||
buffer.inject(scratch);
|
||||
renderType.end(this.scratch, 0, 0, 0);
|
||||
buffer.reset();
|
||||
}
|
||||
|
||||
buffer.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,6 +48,8 @@ public class BatchingEngine implements Engine {
|
|||
var stack = FlwUtil.copyPoseStack(context.stack());
|
||||
stack.translate(-cameraPos.x, -cameraPos.y, -cameraPos.z);
|
||||
|
||||
// TODO: async task engine barriers
|
||||
taskEngine.syncPoint();
|
||||
submitTasks(taskEngine, stack, context.level());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue