@Override public void init(final GLAutoDrawable drawable) { final MonitorDevice monitor = glWindow.getMainMonitor(); System.err.println("Main Monitor: "+monitor); final float[] pixelPerMM = monitor.getPixelsPerMM(new float[2]); System.err.println(" pixel/mm ["+pixelPerMM[0]+", "+pixelPerMM[1]+"]"); System.err.println(" pixel/in ["+pixelPerMM[0]*25.4f+", "+pixelPerMM[1]*25.4f+"]"); final GL gl = drawable.getGL(); System.err.println(JoglVersion.getGLInfo(gl, null)); System.err.println("Requested: "+drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities()); System.err.println("Chosen : "+drawable.getChosenGLCapabilities()); System.err.println("GL impl. class "+gl.getClass().getName()); if( gl.isGL4ES3() ) { final GL4ES3 _gl = gl.getGL4ES3(); System.err.println("GL4ES3 retrieved, impl. class "+_gl.getClass().getName()); } if( gl.isGL3() ) { final GL3 _gl = gl.getGL3(); System.err.println("GL3 retrieved, impl. class "+_gl.getClass().getName()); } if( gl.isGLES3() ) { final GLES3 _gl = gl.getGLES3(); System.err.println("GLES3 retrieved, impl. class "+_gl.getClass().getName()); } if( gl.isGLES2() ) { final GLES2 _gl = gl.getGLES2(); System.err.println("GLES2 retrieved, impl. class "+_gl.getClass().getName()); } }
protected GL2 getGL2(GLAutoDrawable drawable) { LOGGER.info("GL context : " + drawable.getContext()); LOGGER.info("GL profile : " + drawable.getGLProfile()); LOGGER.info("GL impl : " + drawable.getGL().getClass().getSimpleName()); LOGGER.info("isGL : " + drawable.getGL().isGL()); LOGGER.info("isGL2 : " + drawable.getGL().isGL2()); LOGGER.info("isGLES1 : " + drawable.getGL().isGL2ES1()); LOGGER.info("isGLES2 : " + drawable.getGL().isGL2ES2()); LOGGER.info("isGLES3 : " + drawable.getGL().isGL2ES3()); LOGGER.info("isGL2GL3 : " + drawable.getGL().isGL2GL3()); LOGGER.info("isGL3 : " + drawable.getGL().isGL3()); LOGGER.info("isGL3core : " + drawable.getGL().isGL3core()); LOGGER.info("isGL3ES3 : " + drawable.getGL().isGL3ES3()); LOGGER.info("isGL4 : " + drawable.getGL().isGL4()); LOGGER.info("isGL4bc : " + drawable.getGL().isGL4bc()); if (drawable.getGL() instanceof GL4bcImpl) { return drawable.getGL().getGL3().getGL2();//(GL2)drawable;//drawable.getGL().getGL2();//getGL3().getGL2(); } else { return (GL2)drawable;//drawable.getGL().getGL2(); } }