Loading... |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1 post
|
I am looking for a simple JOGL shader example that shows the essentials of pixel and vertex shading - for example, one triangle with shaders that simply copy the values from the geometry. Such an example must exist, but I can't find it... Can anyone help?
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
214 posts
|
Maybe u should check out the turorial section in the jogamp wiki ? There are a couple of very basic setup tutorials that might fit ur description ...
For more advanced examples u may have a look at my blog @tumblr. It also features a very basic vertex shading example. Hope this gets u started ... :) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2960 posts
|
On 06/19/2012 07:59 AM, Demoscene Passivist [via jogamp] wrote:
> Maybe u should check out the turorial section in the jogamp wiki > <http://jogamp.org/wiki/index.php/Jogl_Tutorial> ? There are a couple of very > basic setup tutorials that might fit ur description ... > > For more advanced examples u may have a look at my blog @tumblr. > <http://copypastaresearch.tumblr.com/> It also features a very basic vertex > shading example > <http://copypastaresearch.tumblr.com/post/1033237190/ported-another-glsl-routine-to-jogl2-this-time-a>. > > > Hope this gets u started ... :) > <http://jogamp.org/git/?p=jogl-demos.git;a=blob;f=src/demos/es2/RawGL2ES2demo.java;hb=HEAD> And our junit tests and demos ofc: <http://jogamp.org/git/?p=jogl.git;a=tree;f=src/test/com/jogamp/opengl/test/junit/jogl/glsl;hb=HEAD> <http://jogamp.org/git/?p=jogl.git;a=tree;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2;hb=HEAD> ~Sven |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
557 posts
|
In reply to this post by Agnes
2012-06-19 06:55, Agnes [via jogamp] skrev:
I am looking for a simple JOGL shader example that shows the essentials of pixel and vertex shading - for example, one triangle with shaders that simply copy the values from the geometry. Such an example must exist, but I can't find it... Can anyone help?Hi I created a really basic example, to help my own understanding, that displays a shaded triangle that you can try: https://raw.github.com/xranby/jogl/master/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RawGL2ES2demo.java wget http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z 7z x jogamp-all-platforms.7z cd jogamp-all-platforms wget https://raw.github.com/xranby/jogl/master/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RawGL2ES2demo.java javac -cp jar/jogl.all.jar:jar/gluegen-rt.jar RawGL2ES2demo.java java -cp jar/jogl.all.jar:jar/gluegen-rt.jar:. RawGL2ES2demo
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
15 posts
|
Thank you all for your help. The xranby example is perfect for me - both kinds of shader in one file, no IO or other fussiness.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
15 posts
|
I have the sample running on my machine. There was one small issue: the GLSL compiler complained that the "#version" instruction had to be the first statement in the file - it obviously counted the #ifdef as a statement.
|
Loading... |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
2 posts
|
In reply to this post by Agnes
Take a look here,
it has all you need to get shaders up and working. http://www.guyford.co.uk/showpage.php?id=50&page=How_to_setup_and_load_GLSL_Shaders_in_JOGL |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6045 posts
|
It is an example relying on an obsolete version of JOGL and I already told you once to avoid posting that kind of example to avoid confusing beginners. Moreover, it is not more useful than existing examples on the official repository, lots of checks are missing in yours.
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |