diff --git a/src/main/java/net/vulkanmod/render/chunk/WorldRenderer.java b/src/main/java/net/vulkanmod/render/chunk/WorldRenderer.java index 53152834a..ace5b4080 100644 --- a/src/main/java/net/vulkanmod/render/chunk/WorldRenderer.java +++ b/src/main/java/net/vulkanmod/render/chunk/WorldRenderer.java @@ -40,6 +40,7 @@ import net.vulkanmod.vulkan.memory.IndexBuffer; import net.vulkanmod.vulkan.memory.IndirectBuffer; import net.vulkanmod.vulkan.memory.MemoryTypes; +import net.vulkanmod.vulkan.queue.Queue; import net.vulkanmod.vulkan.shader.GraphicsPipeline; import net.vulkanmod.vulkan.texture.VTextureSelector; import org.jetbrains.annotations.Nullable; @@ -95,7 +96,8 @@ private WorldRenderer(RenderBuffers renderBuffers) { allocateIndirectBuffers(); BlockRenderer.setBlockColors(this.minecraft.getBlockColors()); - + addOnAllChangedCallback(Queue::trimCmdPools); + Renderer.getInstance().addOnResizeCallback(Queue::trimCmdPools); Renderer.getInstance().addOnResizeCallback(() -> { if (this.indirectBuffers.length != Renderer.getFramesNum()) allocateIndirectBuffers();