One liners

- Fix nothing rendering + gl error spam when renderdoc is not attached
 - Fix fog rendering incorrectly with indirect
This commit is contained in:
Jozufozu 2022-08-21 23:02:43 -07:00
parent 8833181cfe
commit 0e6f249cd0
2 changed files with 5 additions and 2 deletions

View File

@ -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);

View File

@ -137,6 +137,9 @@ public class IndirectCullingGroup<T extends InstancedPart> {
buffers.bindObjectAndTarget();
buffers.bindIndirectBuffer();
UniformBuffer.getInstance()
.sync();
memoryBarrier();
drawSet.submit(stage);