Login  Register

Re: Looking for Tutorials

Posted by Xerxes Rånby on Mar 19, 2014; 8:53am
URL: https://forum.jogamp.org/Looking-for-Tutorials-tp4031967p4031968.html

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