I have an application using OpenGL code. Now I want to convert it into JOGL code. Is it possible to convert OpenGL code to JOGL? What are the changes we have to do?
This tutorial might be handy. Basically you need to make all the OpenGL global function calls into calls on the proper object instance. This goes for constants too:
glBegin(GL_WHATEVER);
becomes
gl.glBegin(GL.GL_WHATEVER);
Most opengl functions are named the same in jogl and reside in the GL class. If you know opengl then it will be very easy for you to port it to jogl.
the first steps are:
GL gl = arg0.getGL();
GLU glu = arg0.getGLU();
Have a look at some tutorial on the web which will help you to get started.
There are the famous suit of Nehe Tutorials for OpenGL, as mentioned above. The best part of this tutorial is that you can view JOGL and Ogl side by side. In Jogl you basically get a thin wrapper around OpenGL with Java syntax, garbage collection and all other libraries available. Making streaming objects and textures over the net and rendering them via OpenGL a breeze, you can also play around with shaders and perform array calculations faster in java using Jogl.