Re: Setting Up JOGL for OpenGL on Windows 10
Posted by
gouessej on
Apr 13, 2017; 10:36am
URL: https://forum.jogamp.org/Setting-Up-JOGL-for-OpenGL-on-Windows-10-tp4037846p4037853.html
Hi
Have you ever read our wiki? This page might help:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDEI'm under Mageia Linux too.
If you want to simplify the use of JogAmp (including JOGL, JOCL, JOAL, GlueGen, ...), you can use the JogAmp fat JAR (jogamp-fat.jar) in this archive:
http://jogamp.org/deployment/jogamp-current/archive/jogamp-fat-all.7zThis fat JAR contains everything you need, both the Java libraries and the native libraries. The automated native library loading is enabled by default, which means that you don't need to tinker the .so/.dll/.jnilib files, GlueGen automatically detects your architecture and your operating system, picks the right native libraries within the JAR(s), extract them and load them.
I advise you to look at this rudimentary example:
https://gist.github.com/gouessej/3420e2b6f632efdddf98You need to get the GL object from the GLAutoDrawable object mainly in the GLEventListener.display() method in which the OpenGL context is guaranteed to be current. You can get this GL object outside of the GLEventListener with GLContext.getCurrentGL() but you have to be sure that the OpenGL context is current otherwise it won't work. The example above is extremely simple, it's just good to understand the basic concepts of JOGL before going any further.