diff options
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 70 |
1 files changed, 54 insertions, 16 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index 537b32355..e85d67dea 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -49,6 +49,8 @@ import javax.media.nativewindow.util.InsetsImmutable; import javax.media.nativewindow.util.Point; import javax.media.opengl.FPSCounter; import javax.media.opengl.GL; +import javax.media.opengl.GL3; +import javax.media.opengl.GL4ES3; import javax.media.opengl.GLAnimatorControl; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLCapabilities; @@ -56,6 +58,8 @@ import javax.media.opengl.GLCapabilitiesImmutable; import javax.media.opengl.GLContext; import javax.media.opengl.GLDrawable; import javax.media.opengl.GLDrawableFactory; +import javax.media.opengl.GLES2; +import javax.media.opengl.GLES3; import javax.media.opengl.GLEventListener; import javax.media.opengl.GLException; import javax.media.opengl.GLProfile; @@ -830,23 +834,38 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind * A most simple JOGL AWT test entry */ public static void main(String args[]) { - boolean forceES2 = false; - boolean forceES3 = false; - boolean forceGL3 = false; - if( null != args ) { - for(int i=0; i<args.length; i++) { - if(args[i].equals("-es2")) { - forceES2 = true; - } else if(args[i].equals("-es3")) { - forceES3 = true; - } else if(args[i].equals("-gl3")) { - forceGL3 = true; - } + final boolean forceES2; + final boolean forceES3; + final boolean forceGL3; + final boolean forceGL4ES3; + { + boolean _forceES2 = false; + boolean _forceES3 = false; + boolean _forceGL3 = false; + boolean _forceGL4ES3 = false; + if( null != args ) { + for(int i=0; i<args.length; i++) { + if(args[i].equals("-es2")) { + _forceES2 = true; + } else if(args[i].equals("-es3")) { + _forceES3 = true; + } else if(args[i].equals("-gl3")) { + _forceGL3 = true; + } else if(args[i].equals("-gl4es3")) { + _forceGL4ES3 = true; + } + } } + forceES2 = _forceES2; + forceES3 = _forceES3; + forceGL3 = _forceGL3; + forceGL4ES3 = _forceGL4ES3; } - System.err.println("forceES2 "+forceES2); - System.err.println("forceES3 "+forceES3); - System.err.println("forceGL3 "+forceGL3); + System.err.println("forceES2 "+forceES2); + System.err.println("forceES3 "+forceES3); + System.err.println("forceGL3 "+forceGL3); + System.err.println("forceGL4ES3 "+forceGL4ES3); + System.err.println(VersionUtil.getPlatformInfo()); System.err.println(GlueGenVersion.getInstance()); System.err.println(JoglVersion.getInstance()); @@ -854,7 +873,9 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind System.err.println(JoglVersion.getDefaultOpenGLInfo(null, null, true).toString()); final GLProfile glp; - if(forceGL3) { + if(forceGL4ES3) { + glp = GLProfile.get(GLProfile.GL4ES3); + } else if(forceGL3) { glp = GLProfile.get(GLProfile.GL3); } else if(forceES3) { glp = GLProfile.get(GLProfile.GLES3); @@ -876,6 +897,23 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind 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() ) { + GL4ES3 _gl = gl.getGL4ES3(); + System.err.println("GL4ES3 retrieved, impl. class "+_gl.getClass().getName()); + } + if( gl.isGL3() ) { + GL3 _gl = gl.getGL3(); + System.err.println("GL3 retrieved, impl. class "+_gl.getClass().getName()); + } + if( gl.isGLES3() ) { + GLES3 _gl = gl.getGLES3(); + System.err.println("GLES3 retrieved, impl. class "+_gl.getClass().getName()); + } + if( gl.isGLES2() ) { + GLES2 _gl = gl.getGLES2(); + System.err.println("GLES2 retrieved, impl. class "+_gl.getClass().getName()); + } } @Override |