OpenGL ES desktop application with JOGL

I’m about to implement a Java SE version of an existing Android application which uses OpenGL ES 1.0 (javax.microedition.khronos.opengles.GL10) with fixed point calculations. Ideally the OpenGL part should be kept common on both platforms. What is the indented way of using the JOGL library to accomplishing this?

In the javax.media.opengl.GL2ES1 interface there is no access to fixed point operations like glTranslatex and glRotatex. These are only available in GLES1 but if I try to use this interface in the Java SE application I get a GLExecption with the message “Not a GLES1 implementation”. Also I’m a bit confused exactly which jar files should be used. Any help on these issues would be very welcome.

I’m not sure what’s special about the glTranslatex etc. functions in the ES profile, but the GL2ES1 profile also has glTranslatef and glMultMatrixf which are the fixed-function matrix operations that are used in desktop opengl. You could try writing your ES code to use the f versions instead of the x ones.

Another approach, and this is something I did before they added a combined GL2 and GL3 profile was to write wrapper functions that (in your case) would call the GLES1 or GL2 fixed-function call depending on what the current profile is.