From a93e06101364003c1b95aa976b7fb1745dce7167 Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:56:34 -0800 Subject: [PATCH] Actually use the provided instance --- .../flywheel/backend/engine/indirect/StagingBuffer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java index 1cff2d8c8..0611b0166 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java @@ -72,9 +72,6 @@ public class StagingBuffer { } public StagingBuffer(long capacity, IndirectPrograms programs) { - scatterProgram = IndirectPrograms.get() - .getScatterProgram(); - this.capacity = capacity; vbo = GL45C.glCreateBuffers(); @@ -84,6 +81,8 @@ public class StagingBuffer { totalAvailable = capacity; FlwMemoryTracker._allocCPUMemory(capacity); + + scatterProgram = programs.getScatterProgram(); } /**