– Re: Handling window events when using a dedicated OpenGL thread
In Reply To
To work with NEWT's Threading model, do I:
Setup an Animator to handle calling GLWindow.display() in a loop, and within the execution of display() do any rendering work my producer Threads have produced & end with a call to GLAutoDrawable.swapBuffers() if I have new content to show - where I've set GLWindow.setAutoSwapBufferMode( false ) ?
Not use an animator, and instead use GLAutoDrawable.invoke(boolean, GLRunnable) from my producer threads directly & in the case of a frame update return true in the GLRunnable implementation to signal I want a GLWindow.display call - where I have set GLWindow.setAutoSwapBufferMode( true ) ?
Or neither of these because I'm still missing the point :(
Thank you very much for your help & time! It's much appreciated to be able to get support like this.
Thanks for the information and you're quite right I don't want to re-invent the wheel - I do tend to go off on a tangent sometimes & make life difficult for myself... I would much rather use something tried & tested written by people more intelligent than I - my issue is I haven't done enough to learn about NEWT's threading model for which I humbly apologise.