Skip to content

Commit ffbb13f

Browse files
authored
Improve extension matching and webgl extensions support (#2728)
1 parent 530fb0e commit ffbb13f

6 files changed

Lines changed: 212 additions & 47 deletions

File tree

jme3-android/src/main/java/com/jme3/renderer/android/AndroidGL.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,21 @@ public void glVertexAttribDivisorARB(int index, int divisor) {
595595
GLES30.glVertexAttribDivisor(index, divisor);
596596
}
597597

598+
@Override
599+
public int glGetUniformBlockIndex(int program, String uniformBlockName) {
600+
return GLES30.glGetUniformBlockIndex(program, uniformBlockName);
601+
}
602+
603+
@Override
604+
public void glBindBufferBase(int target, int index, int buffer) {
605+
GLES30.glBindBufferBase(target, index, buffer);
606+
}
607+
608+
@Override
609+
public void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) {
610+
GLES30.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
611+
}
612+
598613
@Override
599614
public void glBindFramebufferEXT(int param1, int param2) {
600615
GLES20.glBindFramebuffer(param1, param2);
@@ -759,4 +774,3 @@ public void glGenVertexArrays(IntBuffer arrays) {
759774
}
760775

761776
}
762-

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,39 @@ public void glTexImage2DMultisample(int target, int samples, int internalFormat,
260260
*/
261261
public void glVertexAttribDivisorARB(int index, int divisor);
262262

263+
/**
264+
* Retrieves the index of a named uniform block.
265+
*
266+
* @param program the name of a program containing the uniform block
267+
* @param uniformBlockName the name of the uniform block whose index to retrieve
268+
* @return the block index
269+
*/
270+
public default int glGetUniformBlockIndex(int program, String uniformBlockName) {
271+
throw new UnsupportedOperationException("Uniform buffer objects are not supported");
272+
}
273+
274+
/**
275+
* Binds a buffer object to an indexed buffer target.
276+
*
277+
* @param target the target of the bind operation
278+
* @param index the index of the binding point within the array specified by {@code target}
279+
* @param buffer a buffer object to bind to the specified binding point
280+
*/
281+
public default void glBindBufferBase(int target, int index, int buffer) {
282+
throw new UnsupportedOperationException("Uniform buffer objects are not supported");
283+
}
284+
285+
/**
286+
* Assigns a uniform block to a binding point.
287+
*
288+
* @param program the name of a program object
289+
* @param uniformBlockIndex the index of the active uniform block within {@code program}
290+
* @param uniformBlockBinding the binding point to assign
291+
*/
292+
public default void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) {
293+
throw new UnsupportedOperationException("Uniform buffer objects are not supported");
294+
}
295+
263296
public default void glPushDebugGroup(int source, int id, String message) {
264297
}
265298

0 commit comments

Comments
 (0)