Any Fragment Examples?

Does any one have any decent examples of using fragment shaders in jogl? Basicially I would like to load an image as a texture and then modify it using a fragment (shader). It seems from the jogl-demos that this should be possible but unfortunately most of those examples are quite complex and as such are rather complicated as examples go.

Hello,

loading a fragment shader isn’t very difficult in jogl.
I have prepared a little example for you :

http://www.horustempel.de/OpenGL/Jogl/TexFrag.zip

(start with ‘java ShaderFrame’)

It loads a texture, a vertex shader and a fragment shader and applies it onto a teapot :wink:
You can rotate the teapot while pressing the left mouse button and zoom in and out while pressing the right mouse button.

The example only works if your graphic card supports the OpenGL Shading Language.

Oliver