mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 20:45:59 +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
8833181cfe
commit
0e6f249cd0
@ -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 New Issue
Block a user