mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-06 04:16:36 +01:00
One liners
- Fix nothing rendering + gl error spam when renderdoc is not attached - Fix fog rendering incorrectly with indirect
This commit is contained in:
parent
9a4cfbe47c
commit
57f6a48969
2 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
|
||||
import static org.lwjgl.opengl.GL45.glCreateBuffers;
|
||||
import static org.lwjgl.opengl.GL46.GL_DRAW_INDIRECT_BUFFER;
|
||||
import static org.lwjgl.opengl.GL46.GL_DYNAMIC_STORAGE_BIT;
|
||||
import static org.lwjgl.opengl.GL46.GL_MAP_FLUSH_EXPLICIT_BIT;
|
||||
|
@ -10,7 +11,6 @@ import static org.lwjgl.opengl.GL46.glBindBuffer;
|
|||
import static org.lwjgl.opengl.GL46.glCopyNamedBufferSubData;
|
||||
import static org.lwjgl.opengl.GL46.glDeleteBuffers;
|
||||
import static org.lwjgl.opengl.GL46.glFlushMappedNamedBufferRange;
|
||||
import static org.lwjgl.opengl.GL46.glGenBuffers;
|
||||
import static org.lwjgl.opengl.GL46.glNamedBufferStorage;
|
||||
import static org.lwjgl.opengl.GL46.nglBindBuffersRange;
|
||||
import static org.lwjgl.opengl.GL46.nglCreateBuffers;
|
||||
|
@ -154,7 +154,7 @@ public class IndirectBuffers {
|
|||
|
||||
var drawSize = DRAW_COMMAND_STRIDE * drawCount;
|
||||
if (maxDrawCount > 0) {
|
||||
int drawNew = glGenBuffers();
|
||||
int drawNew = glCreateBuffers();
|
||||
|
||||
glNamedBufferStorage(drawNew, drawSize, SUB_DATA_BITS);
|
||||
|
||||
|
|
|
@ -137,6 +137,9 @@ public class IndirectCullingGroup<T extends InstancedPart> {
|
|||
buffers.bindObjectAndTarget();
|
||||
buffers.bindIndirectBuffer();
|
||||
|
||||
UniformBuffer.getInstance()
|
||||
.sync();
|
||||
|
||||
memoryBarrier();
|
||||
|
||||
drawSet.submit(stage);
|
||||
|
|
Loading…
Reference in a new issue