Skip to content

Commit bc30ebc

Browse files
committed
fix: immutable storage GL_DYNAMIC_STORAGE_BIT bit
1 parent 80d41e3 commit bc30ebc

File tree

1 file changed

+3
-4
lines changed
  • common/src/main/kotlin/com/lambda/graphics/buffer

1 file changed

+3
-4
lines changed

common/src/main/kotlin/com/lambda/graphics/buffer/IBuffer.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ package com.lambda.graphics.buffer
2020
import com.lambda.graphics.gl.bufferBound
2121
import com.lambda.graphics.gl.bufferUsageValid
2222
import com.lambda.graphics.gl.bufferValid
23-
import org.lwjgl.opengl.GL30C.*
24-
import org.lwjgl.opengl.GL44.glBufferStorage
23+
import org.lwjgl.opengl.GL44.*
2524
import java.nio.ByteBuffer
2625

2726
abstract class IBuffer(
@@ -212,7 +211,7 @@ abstract class IBuffer(
212211

213212
repeat(buffers) {
214213
bind()
215-
glBufferStorage(target, data, usage)
214+
glBufferStorage(target, data, access or GL_DYNAMIC_STORAGE_BIT)
216215
swap()
217216
}
218217

@@ -237,7 +236,7 @@ abstract class IBuffer(
237236

238237
repeat(buffers) {
239238
bind()
240-
glBufferStorage(target, size.coerceAtLeast(0), usage)
239+
glBufferStorage(target, size.coerceAtLeast(0), access or GL_DYNAMIC_STORAGE_BIT)
241240
swap()
242241
}
243242

0 commit comments

Comments
 (0)