InterviewSolution
| 1. |
How To Develop Cross-device Applications? |
|
Answer» First you have to PICK your LOWEST common DENOMINATOR of an OpenGL profile, ie OpenGL ES1 or ES2. For either we offer an intersecting desktop GL profile, GL2ES1 or GL2ES2. Use the latter while creating your GLCapabilities. Build and run your application with the minimum GL profile JARS, e.g. on the desktop use: ~/jogl-demos> . ./setenv-jogl.sh JOGL_GL2ES12_MIN ../jogl/build Here you are on a Unix platform (not Window) and your common build subdirectory is 'build'. jogl-demos/setenv-jogl.sh is provided within jogl-demos, which itself utilizes jogl/etc/profile.jogl. This uses the GlueGen/JOGL JARS:
This uses the GlueGen/JOGL atomic JARS for minimal deployment:
Now, the same Java application shall run on all devices, desktop and mobile. See demos.es1.RedSquare of the jogl-demos repository. On the desktop you may run the ES1 demo: ~/jogl-demos> sh java-run-newt.sh demos.es1.RedSquare -GL2ES1 and the output is: NULL RedSquare.run() 0 GLProfile[GL2ES1/GL2ES12] GL Profile: GLProfile[GL2ES1/GL2ES12] GLProfile[GL2ES1/GL2ES12] GL:com.sun.opengl.impl.gl2es12.GL2ES12Impl@b815859 GLProfile[GL2ES1/GL2ES12] GL_VERSION=3.0.0 NVIDIA 185.18.14 GLProfile[GL2ES1/GL2ES12] GL_EXTENSIONS: .. First you have to pick your lowest common denominator of an OpenGL profile, ie OpenGL ES1 or ES2. For either we offer an intersecting desktop GL profile, GL2ES1 or GL2ES2. Use the latter while creating your GLCapabilities. Build and run your application with the minimum GL profile JARS, e.g. on the desktop use: ~/jogl-demos> . ./setenv-jogl.sh JOGL_GL2ES12_MIN ../jogl/build Here you are on a Unix platform (not Window) and your common build subdirectory is 'build'. jogl-demos/setenv-jogl.sh is provided within jogl-demos, which itself utilizes jogl/etc/profile.jogl. This uses the GlueGen/JOGL JARS: This uses the GlueGen/JOGL atomic JARS for minimal deployment: Now, the same Java application shall run on all devices, desktop and mobile. See demos.es1.RedSquare of the jogl-demos repository. On the desktop you may run the ES1 demo: ~/jogl-demos> sh java-run-newt.sh demos.es1.RedSquare -GL2ES1 and the output is: null RedSquare.run() 0 GLProfile[GL2ES1/GL2ES12] GL Profile: GLProfile[GL2ES1/GL2ES12] GLProfile[GL2ES1/GL2ES12] GL:com.sun.opengl.impl.gl2es12.GL2ES12Impl@b815859 GLProfile[GL2ES1/GL2ES12] GL_VERSION=3.0.0 NVIDIA 185.18.14 GLProfile[GL2ES1/GL2ES12] GL_EXTENSIONS: .. |
|