Migrating from version 1.1.1 to 2.0

Hello!

I’m considering reworking my engine to use only OpenGL version 3.1 (core) features and thus I need to upgrade from JOGL 1.1.1 to 2.0.

If I get a

GL3 gl = drawable.getGL().getGL3() 

and use it, that’s all I have to do about the profile? Or do I need to do something more?

I’ve read in this topic http://www.java-gaming.org/index.php/topic,21485.0.html (very useful) the following lines:

drawable.setGL(new DebugGL3(drawable.getGL().getGL3()));
GL3 gl = drawable.getGL().getGL3();

Is that to get exceptions (good for debbugging) or does also set the core profile?

The last question: Any tips on upgrading to JOGL 2.0 (tutorials, known bugs)?

Thanks

You specify the profile when creating a GLCapabilities I believe. Then any drawables created with those caps can return a GL3 if possible, and creation will likely fail when it can’t get the desired opengl profile on the platform running the program.

When I was porting to JOGL 2, I found that using the AWT windowing API was still the best way to go. NEWT had limited functionality (couldn’t specify the new display mode for a fullscreen window) and lacked documentation. Additionally, it was quite buggy on Mac when I tried, and required the extra parameter -XrunOnFirstThread (or something like that).

hello yombo,

its good for debugging. It basically checks after every call if an error code has been set by opengl and throws an exception. The performance penalty is usually not noticeable.

Technically it adds an additional layer between your application and the driver. You usually want to set this once e.g. in init. There is also TraceGL whch prints all calls to a stream… we will add more layers in future.

we prepared an automatic refactoring script which does around 90% of the refactoring work to port a jogl1.1.1 application to the latest JOGL 2 revision. It is a bit experimental (well even the jackpot compiler is experimental) and unfinished but might be already of use.

we have an wiki, bugzilla etc for all GlueGen based project on http://jogamp.org/ but we are currently switching servers. The website should be online by the end of this week again.

in the meantime you could take a look at my old blog entry about profiles (its a bit outdated, the GL4 profile and a few other things are missing…):
http://michael-bien.com/mbien/entry/jogl_2_opengl_profiles_explained

also newt should be more stable now but it still isn’t finished yet.
regards,
michael

Thanks to both of you