Posted by Sven Gothel on Aug 22, 2011; 6:17pm URL: https://forum.jogamp.org/GL2ES2-implementation-tp3270403p3275879.html
On Saturday, August 20, 2011 01:17:12 PM Francois [via jogamp] wrote:
>
> I'm busy reading OpenGL ES 2.0 Programming Guide and decided to try and work
> in Java (since I'm more comfortable with it). Trying to get JOGL up and
> running with GL2ES2 has been a case of trial and error (almost all the
> tutorials I find are not GLSL based and when they are they are using those
> glBegin() and glEnd() methods, which I can't use). I can display a single
> coloured triangle, but I'm not able to translate/rotate it because I don't
> know how to do it with JOGL.
I can now recommend reading the Gears ES1 and ES2 demo's within JOGL's unit tests.
Both variants will run on desktop either with GL2ES1 (fixed function pipeline)
or with GL2ES2 (programmable shader pipeline).
They also shall run on devices offering ES1 and/or ES2.
Both variation use the same data set, interleaved VBOs.
They utilize the util classes GLArrayData* providing easy VBO construction.
The ES2 variation provides the per pixel lighting (ambient, diffuse and specular),
where the ES1 version uses the only ambient and diffuse fixed function ligthing.
The ES2 variation also demonstrates the use of our PMVMatrix util class,
supporting fixed function like matrix operations.
It also uses the ShaderUtils and ShaderState util classes for easy shader and data management.