# OpenGL Context creation takes over a second

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?

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