Looking for Tutorials

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Looking for Tutorials

Borok
I have a background in using OpenGL and C++. Recently I have been given a project in Java and I am trying to work out how to use OpenGL calls in Java.

I am guessing that a program using OpenGL written in Java will be similar to that in C++: load OpenGL pointers, create an OpenGL context (window), loop until the window is closed and execute rendering functions in this loop.

I am looking for a tutorial that explains the following:
- Open a window (I've been trying to figure out how to do this with NEWT but I can't find any examples).
- Load shaders
- Draw something basic (like a triangle).

I need a tutorial that uses modern OpenGL (OpenGL 3.3 or later).

I have been searching for weeks for a tutorial but the internet is full of tutorials that use deprecated functions and are poorly documented/commented.

Can someone recommend some tutorials please.
Reply | Threaded
Open this post in threaded view
|

Re: Looking for Tutorials

Xerxes Rånby
This post was updated on .
Borok wrote
...
I am looking for a tutorial that explains the following:
- Open a window (I've been trying to figure out how to do this with NEWT but I can't find any examples).
- Load shaders
- Draw something basic (like a triangle).

I need a tutorial that uses modern OpenGL (OpenGL 3.3 or later).
...
I have published a simple self contained demo inside the jogl-demos git that
opens a window using NEWT
A most simple example:
GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL3));
GLWindow glWindow = GLWindow.create(caps);
glWindow.setVisible(true);
loads shaders

and draws a triange
http://jogamp.org/git/?p=jogl-demos.git;a=blob;f=src/demos/es2/RawGL2ES2demo.java;hb=HEAD

The demo uses the GL2ES2 profile.
Interface containing the common subset of GL3, GL2 and GLES2.
Thus this demo is a OpenGL 3.3 and later demo!
We like to use the GL2ES2 profile for most of the JogAmp demos since it will then run on all modern ES2 - ES3 mobile and embedded devices to the great and powerfull OpenGL 3 core and 4 core systems.
Read more about the JogAmp JOGL profiles and common OpenGL Profile Subsets at: http://jogamp.org/jogl/doc/Overview-OpenGL-Evolution-And-JOGL.html

There is several more GL2ES2 and GL3 NEWT demos found inside jogl jogl-test.jar junit src/test directory:
https://jogamp.org/git/?p=jogl.git;a=tree;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2;hb=HEAD
https://jogamp.org/git/?p=jogl.git;a=tree;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/gl3/newt;hb=HEAD

Cheers
Xerxes
Reply | Threaded
Open this post in threaded view
|

Re: Looking for Tutorials

gouessej
Administrator
In reply to this post by Borok
Hi

There are some tutorials in the wiki:
http://jogamp.org/wiki/index.php/Jogl_Tutorial

Elect86's tutorial may interest you as it uses "modern" OpenGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Looking for Tutorials

Borok
None of these are what I'm looking for.

I'm looking for a tutorial that covers the necessary steps in blocks kind of like a lesson - these are all completed programs which isn't helpful when something doesn't work or when I don't understand how something is done because I have to a problematic needle in a 500 line haystack.

A good example of the type of thing I am looking for is this http://www.opengl-tutorial.org/ (A JOGL version though)
I'm also happy for video tutorials as well, something that explains how things work rather than just an example of a working program.
Reply | Threaded
Open this post in threaded view
|

Re: Looking for Tutorials

gouessej
Administrator
Sorry, Elect86's source code examples are a port of full tutorials written in C++ with consistent explanations.

As JOGL is mostly an OpenGL binding, we just port the code, we don't rewrite the whole tutorials as we assume developers are able to understand OpenGL in plain C, we prefer explaining things that are really specific to JOGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Looking for Tutorials

elect
In reply to this post by Borok
Borok wrote
None of these are what I'm looking for.

I'm looking for a tutorial that covers the necessary steps in blocks kind of like a lesson - these are all completed programs which isn't helpful when something doesn't work or when I don't understand how something is done because I have to a problematic needle in a 500 line haystack.

A good example of the type of thing I am looking for is this http://www.opengl-tutorial.org/ (A JOGL version though)
I'm also happy for video tutorials as well, something that explains how things work rather than just an example of a working program.
Something like this?

http://www.arcsynthesis.org/gltut/