Hi,
I'm a graduate student in CS working mainly with graphics. I started learning graphics about a year and a half ago (as an undergraduate) using JOGL, which was great at the time since Java was the primary language taught at my university. Since then, I started to learn OpenGL and DirectX using C++, but I still use JOGL for many academic projects for its platform independence. One of the things I found difficult in using JOGL was a lack of resources or tutorials while getting started. Reading through an APIs documentation isn't always easy, so I wanted to put together some sort of quick-start guide. This was mainly for my own benefit, but I figured it may also help others out there. If anyone would care to take a quick look through what I've written, please let me know if you see anything which isn't quite correct or misleading. One intention of the tutorials was to get an undergraduate student, new to graphics, to get up and running as quickly as possible. I don't cover OpenGL in much detail at all, as there are tons of resources available for it already. https://sites.google.com/site/justinscsstuff/jogl-tutorials Thanks, Justin |
you are indeed filling a huge gap with this tutorials. Very good explained. just two small remarks: you are using GLProfile in all examples very early in the program - this is good since if you would do any GUI work before this call it would probably crash on linux. To prevent this just call GLProfile.initSingleton() explicitely before doing anything with GUIs. This allows JOGL to do some linux specific locking optimization. I don't know the status of this particular issue but it was planed to make those optimizations optional (opt-in) to don't have this a bit confusing requirement to call GLProfile.initSingleton() so early. (Its currently a showstopper which prevents using latest builds of JOGL 2 in module systems like the NetBeans platform) this is a bit under-documented since its not final yet... sorry for that. FPSAnimator: maybe mention that the coolest way of limiting the framerate is by using the simple Animator to render fast as possible and asking the driver to do the work for you. gl.setSwapInterval(1); // -> synchronizes the framerate with the screen refresh rate of your monitor (vsync) (but its known to be ignored on some intel cards) thank you for the contribution, good work! -michael On 08/30/2010 01:03 AM, Justin [via jogamp] wrote: Hi, -- http://michael-bien.com/ |
Administrator
|
In reply to this post by Justin
Wow, fantastic job!
>One of the things I found difficult in using JOGL was a lack of resources >or tutorials while getting started. Thats exactly what I experienced when I started using JOGL. Ur tutorials really fill a documentation gap here. We should definitely integrate/link this in the Wiki in the JOGL Tutorials section. Michael ? |
On 08/30/2010 10:21 AM, Demoscene Passivist [via jogamp] wrote: > Thats exactly what I experienced when I started using JOGL. Ur > tutorials really fill a documentation gap here. We should definitely > integrate/link this in the Wiki in the JOGL Tutorials section. Michael ? will do. -michael |
Thanks for the feedback. I will try to incorporate what Michael said, and I appreciate your responses.
|
In reply to this post by Demoscene Passivist
done:
http://jogamp.org/wiki/index.php/Jogl_Tutorial (also linked from project page http://jogamp.org/jogl/www/) On 08/30/2010 10:21 AM, Demoscene Passivist [via jogamp] wrote: Wow, fantastic job! -- http://michael-bien.com/ |
Good work! Tutorials from Justin and Demoscene Passivist's blog were needed here. I understand that there is no time for Michael Bien and Sven Gothel to update JOGL user guide. Wish you good luck guys to bring JOGL 2 to release.
|
Great tutorials. Thanks!
|
In reply to this post by Justin
I've been looking for about an hour for something just like this. Thanks so much for putting the time to put this together!
|
Thanks, I'm glad they're helpful. I started to write some examples of how to render the same thing with different techniques (immediate mode, display lists, vertex arrays, vertex buffer objects) as well, but I have too many things on my plate right now.
|
https://sites.google.com/site/justinscsstuff/jogl-tutorial-3
the render method in the animated triangle shows a error if followed in the tutorial. gl.glBegin(GL.GL_TRIANGLES); gl.glColor3f(1, 0, 0); gl.glVertex2d(-c, -c); gl.glColor3f(0, 1, 0); gl.glVertex2d(0, c); gl.glColor3f(0, 0, 1); gl.glVertex2d(s, -s); gl.glEnd(); c and s are declared as double, but the method glvertex2d is a (float, float). To fix this I converted the c and s as such: gl.glBegin(GL.GL_TRIANGLES); gl.glColor3f(1,0,0); gl.glVertex2f(-(float)c, -(float)c); gl.glColor3f(0,1, 0); gl.glVertex2f(0, (float)c); gl.glColor3f(0, 0, 1); gl.glVertex2f((float)s, -(float)s); gl.glEnd(); just pointing this out if u want to update the tutorial |
Hi Luis,
Actually, vertex2d is (double, double); you may be thinking of vertex2f. Justin |
I feel silly, it would seen I typed it wrong. you are right eclipse kept on giving me an error, but it wasn't syntax so I checked the logic and saw that it kept asking for a float value and no double in the vertex. it should have been vertex2d no vertex2f as I typed it.( i am sure is the stupid auto complete logic of eclipse that is messing up with me).
|
Free forum by Nabble | Edit this page |