Skip to main content
GameDev.net gamedev.net
🔒 Locked

GLX render thread initialization

Started by JPulham Sep 12, 2009 at 1:47 PM 1 replies 1.6k views
Original Post
JPulham
JPulham
From reading around I have figured out that to do rendering in a separate thread to game logic you create a window and then in the render thread create the context, at least thats how it works with wgl. Is it the same with glx? Do I pass the display, visual and window to the render thread from the window creation and call glXCreateContext/glXMakeCurrent from the render thread? cheers.
Bruce Wheaton
Bruce Wheaton
You probably want to create the X DisplayConnection and thus almost everything else directly on the thread.

Bruce
JPulham
JPulham
Thanks for the reply, but I understood that the keyboard & mouse would be handled in the game logic thread, therefore requiring a window and thus a display connection, while OpenGL render calls were made from a separate thread?
Have I missed the point here? Maybe I wasn't clear enough...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.