I am making a simple program with Java OpenGL (jogl). In the display() method I am printing the name of the thread and the output says it is the AWT thread. Doesn’t OpenGL use its own thread?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Mostly it depends on the version you are using.
For the early version 1.0 and 1.1 jogl used a different thread for the rendering by default.
For version 1.1.1 it was switched to default to using the AWT thread.
This can be manually controlled from the command line using
-Djogl.1thread=trueto force single threaded rendering on the AWT thread or-Djogl.1thread=falseto force multi threaded rendering (one per canvas) outside of the AWT thread.Newer version of Jogl provide a custom toolkit called NEWT that will perform rendering outside of the AWT thread.
The Jogl 1.0/1.1.1 threading behaviour is described here: http://download.java.net/media/jogl/doc/userguide/ in the section “Multithreading Issues”
More information on NEWT threading can be found here: http://jogamp.org/jogl/doc/NEWT-Overview.html