Skip to content

Commit f618b92

Browse files
committed
ARM Mali: Implement gDrawBuffer for gl3es3
I don't know IntBuffer and OpenGL well enought to say if this will leak memory or similar.
1 parent 6562bc4 commit f618b92

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/processing/opengl/PJOGL.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,11 @@ public void drawBuffer(int buf) {
19731973
gl2x.glDrawBuffer(buf);
19741974
} else if (gl3 != null) {
19751975
gl3.glDrawBuffer(buf);
1976+
} else if (gl3es3 != null) {
1977+
IntBuffer intBuffer = IntBuffer.allocate(1);
1978+
intBuffer.put(buf);
1979+
intBuffer.rewind();
1980+
gl3es3.glDrawBuffers(1, intBuffer);
19761981
} else {
19771982
throw new RuntimeException(String.format(MISSING_GLFUNC_ERROR, "glDrawBuffer()"));
19781983
}

0 commit comments

Comments
 (0)