UnsupportedOperationException when calling GLES32 glGetDebugMessageLog

158 views Asked by At

I'd like to debug my OpenGL implementation via Debug Output. I have an interface for several Platforms. On desktop the glGetDebugMessageLog call works as usual.

But on Android I get this error:

java.lang.UnsupportedOperationException: not yet implemented
at android.opengl.GLES32.glGetDebugMessageLog(Native Method)
at com.rebo.opengles.ExampleInstrumentedTest.testOpenGLES32(ExampleInstrumentedTest.java:45)
at java.lang.reflect.Method.invoke(Native Method)
// <23 internal calls>
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:384)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145)

I also checked it on two devices with OpenGL ES32 (Android O + P). (AVD emulator isn't capable of OpenGL ES 3.2 yet.)

Why the method isn't implemented as it already was added in API level 24? I made a fresh project (min API 24) and tested code in the InstrumentedTest section.

@Test
public void testOpenGLES32() {
    int numErrors = 10; // Number of errors I want to receive.

    IntBuffer sources = IntBuffer.allocate(numErrors);
    IntBuffer types = IntBuffer.allocate(numErrors);
    IntBuffer ids = IntBuffer.allocate(numErrors);
    IntBuffer severities = IntBuffer.allocate(numErrors);
    IntBuffer lengths = IntBuffer.allocate(numErrors);
    ByteBuffer messageLog = ByteBuffer.allocate(numErrors);

    GLES11.glEnable(GLES32.GL_DEBUG_OUTPUT_SYNCHRONOUS);
    GLES32.glGetDebugMessageLog(numErrors, sources, types, ids, severities, lengths, messageLog);

    // Do something with the messageLog
}

What could be the problem?

0

There are 0 answers