Skip to content

Commit 64797f9

Browse files
committed
UBO: GL_INVALID_ENUM on Mesa
1 parent 21b7a71 commit 64797f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,9 @@ private void loadCapabilitiesCommon() {
525525
if (hasExtension("GL_ARB_uniform_buffer_object")) {
526526
caps.add(Caps.UniformBufferObject);
527527
limits.put(Limits.UniformBufferObjectMaxBlockSize, getInteger(GL3.GL_MAX_UNIFORM_BLOCK_SIZE));
528-
limits.put(Limits.UniformBufferObjectMaxGeometryBlocks, getInteger(GL3.GL_MAX_GEOMETRY_UNIFORM_BLOCKS));
528+
if (hasExtension("GL_ARB_geometry_shader_4") || caps.contains(Caps.OpenGL32)) {
529+
limits.put(Limits.UniformBufferObjectMaxGeometryBlocks, getInteger(GL3.GL_MAX_GEOMETRY_UNIFORM_BLOCKS));
530+
}
529531
limits.put(Limits.UniformBufferObjectMaxFragmentBlocks, getInteger(GL3.GL_MAX_FRAGMENT_UNIFORM_BLOCKS));
530532
limits.put(Limits.UniformBufferObjectMaxVertexBlocks, getInteger(GL3.GL_MAX_VERTEX_UNIFORM_BLOCKS));
531533
}

0 commit comments

Comments
 (0)