Ejemplo n.º 1
0
  @Test
  public void test02GLDebugError() throws InterruptedException {
    final GLProfile glp = GLProfile.getDefault();

    final WindowContext winctx = createWindow(glp, true);

    final MyGLDebugListener myGLDebugListener =
        new MyGLDebugListener(
            GL2ES2.GL_DEBUG_SOURCE_API, GL2ES2.GL_DEBUG_TYPE_ERROR, GL2ES2.GL_DEBUG_SEVERITY_HIGH);
    winctx.context.addGLDebugListener(myGLDebugListener);

    final GL gl = winctx.context.getGL();

    gl.glBindFramebuffer(-1, -1); // ERROR !

    if (winctx.context.isGLDebugMessageEnabled()) {
      Assert.assertEquals(true, myGLDebugListener.received());
    }

    destroyWindow(winctx);
  }