Jogl Tutorial: Difference between revisions
No edit summary |
|||
Line 37: | Line 37: | ||
[https://www.opengl.org/wiki/Common_Mistakes OpenGL] | [https://www.opengl.org/wiki/Common_Mistakes OpenGL] | ||
[https://www.opengl.org/wiki/GLSL_:_common_mistakes GLSL] | [https://www.opengl.org/wiki/GLSL_:_common_mistakes GLSL] | ||
Another common mistake that may happen if you port code from C/C++ to Java is this one: | |||
<code> | |||
Caused by: com.jogamp.opengl.GLException: unpack pixel_buffer_object must be bound to call this method | |||
at jogamp.opengl.gl4.GL4bcImpl.checkBufferObject(GL4bcImpl.java:40621) | |||
at jogamp.opengl.gl4.GL4bcImpl.checkUnpackPBOBound(GL4bcImpl.java:40707) | |||
at jogamp.opengl.gl4.GL4bcImpl.glTexImage2D(GL4bcImpl.java:5535) | |||
at tests.gl320.Gl_320_fbo_blit.initTexture(Gl_320_fbo_blit.java:199) | |||
</code> | |||
This happens because in C/C++, when you just want to allocate the space for a texture using, for example, ''glTexImage2D'', you should not pass 0 as the last argument, but ''null''. | |||
N.B: The use of color picking is '''NOT''' recommended on any hardware whose palette is partially emulated. | N.B: The use of color picking is '''NOT''' recommended on any hardware whose palette is partially emulated. |
Revision as of 10:24, 26 October 2015
JogAmp's Static
- OpenGL Evolution & JOGL
- API Doc [ Public, Specs [ Nativewindow, JOGL ] ]
- How to Build JOGL
- Userguide
- Deployment
- JOGL Test Applets
- NEWT - High Performance Native Windowing Toolkit
- OpenGL GL2ES2 GLSL Standalone Example by Xerxes Rånby
- Rudimentary standalone example using the fixed pipeline by Julien Gouesse
- Rudimentary standalone example using the fixed pipeline with OpenGL ES 1 by Xerxes Rånby
JogAmp's Wiki
- Downloading and installing JOGL
- Setting up a JogAmp project in your favorite IDE
- Deployment
- JOGL
- FAQ
Hello Triangle
Simple sample that features GL4, pure newt, glWindow options, animator, indexed drawing, dinamic attribute and frag data binding, interleaved data, vao, vbo (with normalization on one attribute), ibo (with shorts), uniform, glsl program (with specific suffix) and matrix jogl util, gl error check, key listener and right way to dispose.
Common Mistakes
I suggest you to take a read to these two pages for a quick overview over the most common problems, it is a very useful reading, legacy sections are carefully signaled.
Another common mistake that may happen if you port code from C/C++ to Java is this one:
Caused by: com.jogamp.opengl.GLException: unpack pixel_buffer_object must be bound to call this method
at jogamp.opengl.gl4.GL4bcImpl.checkBufferObject(GL4bcImpl.java:40621)
at jogamp.opengl.gl4.GL4bcImpl.checkUnpackPBOBound(GL4bcImpl.java:40707)
at jogamp.opengl.gl4.GL4bcImpl.glTexImage2D(GL4bcImpl.java:5535)
at tests.gl320.Gl_320_fbo_blit.initTexture(Gl_320_fbo_blit.java:199)
This happens because in C/C++, when you just want to allocate the space for a texture using, for example, glTexImage2D, you should not pass 0 as the last argument, but null.
N.B: The use of color picking is NOT recommended on any hardware whose palette is partially emulated.
Wade's JOGL tutorials
- Cross-platform workbench program using Eclipse and JOGL
- Faster rendering with vertex buffer objects
- Creating native binary executables for multi-platform Java apps with OpenGL and Eclipse RCP
- Displaying Java OpenGL in an Eclipse RCP editor with a menu bar and a run/pause button
Rami's JOGL tutorials
Justin's Getting Started with JOGL 2 Tutorials
- JOGL Tutorial 1 - Environment Setup
- JOGL Tutorial 2 - Creating a Window
- JOGL Tutorial 3 - Creating a Render Loop
Elect86's modern OpenGL examples
Nils Hoffmann's Netbeans Platform examples
Courses
- Yet Another Tutorial on JOGL 2.0 - Including Nehe JOGL Port (Chua Hock-Chuan's notes at Nanyang Tech. University)
- Johannes's Courses at University of Oldenburg (German)
- Manuel's Courses at European University of Lefke
LeoLoL.com Tutorials (Currently unreachable)
- Lesson 1 - Setting up a JOGL Template
- Lesson 2 - Drawing basic 2D shapes
- Lesson 3 - Adding colour
- Lesson 4 - 3D Shapes and Rotation
JOGL 1 tutorials
Ste3e's JOGL tutorials
(The old (not quite up-to-date) JOGL Userguide is currently available here)