public static void checkerr(GL gl) { int err = gl.glGetError(); if (err != 0) { System.out.println("Checkerr error: " + err); throw (new GLException(err)); } }
public void init(final GLAutoDrawable drawable) { GL _gl = drawable.getGL(); _gl.glGetError(); // flush error .. if (glDebug) { try { _gl = _gl.getContext() .setGL(GLPipelineFactory.create("javax.media.opengl.Debug", null, _gl, null)); } catch (final Exception e) { throw new RuntimeException("can not set debug pipeline", e); } } if (glTrace) { try { _gl = _gl.getContext() .setGL( GLPipelineFactory.create( "javax.media.opengl.Trace", null, _gl, new Object[] {System.err})); } catch (final Exception e) { throw new RuntimeException("can not set trace pipeline", e); } } System.out.println(_gl); _gl.getContext().setGLReadDrawable(externalRead); if (_gl.isGL2GL3()) { _gl.getGL2GL3().glReadBuffer(GL.GL_FRONT); } System.out.println("---------------------------"); System.out.println(_gl.getContext()); System.out.println("---------------------------"); }
public static void checkerr(GL gl) { int err = gl.glGetError(); if (err != 0) throw (glexcfor(err)); }