0
\$\begingroup\$

I'm rewriting an old 3D editor with the goal to make it faster and easier to use. I noticed the following method takes over one second to run. It's called in the app's initialization on the main thread.

javax.media.opengl.GLProfile.initSingleton();

According to online resources, initSingleton() initializes the OpenGL context on the current thread. I know I need to make a GLContext on the thread that will be calling all the OGL functions (the main thread in this case), so I can't just call it in a different thread while Swing is loading.

Is there any other way I can initialize OpenGL?

\$\endgroup\$
  • \$\begingroup\$ Maybe you could try a different OpenGL libraries for Java, like LWJGL3? Not a very good suggestion, I'm afraid. \$\endgroup\$ – user253751 Aug 15 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.