Emedding Shaders in applets

Hello.

I want to make some GPGPU with JOGL. I want to render a paremetric surface(just the points). The coordinates will be generated as a FBO+PBO with a fragment shader and then render this points as VBOs. This way there is not need dor any additional resource, whis is coll beacuse I don’t have my own server(yet!).

The problem is that I dont know how to embed the shader code in my applet code. Any idea?. I don`t want more files than my class files.

Bye!

The way you should be doing this is by having the shader files seperate to your class files. WHen you build it all you should put it into a jar archive and use that as the library for the applet: http://java.sun.com/docs/books/tutorial/deployment/jar/

If you really really do not want anything aside from class files you can do the dogy thing and make the shaders just Strings in your application code. I do not endorse this, but it will work.