Re: Handling window events when using a dedicated OpenGL thread
Posted by
gouessej on
Oct 12, 2017; 5:50pm
URL: https://forum.jogamp.org/Handling-window-events-when-using-a-dedicated-OpenGL-thread-tp4038251p4038252.html
Hi
Rather use GLAutoDrawable.invoke(boolean, GLRunnable) if you need to execute something that requires a current OpenGL context. In my humble opinion, your design is overcomplicated, it doesn't make sense to me. If you reinvent the wheel, you'll be alone with your bugs because you'll have to reinvent our fixes too. NEWT is very flexible and the documentation tells you which methods have to be called on another thread than the EDT. When you don't need a current OpenGL context, don't use the EDT. You can create some threads to handle the tasks that don't need the UI and OpenGL but you don't have to create a thread to do what NEWT already does pretty well.