[SDL] OpenGL - Segmentation Fault Problems

Johannes Schmidt sdl at myrealbox.com
Tue Feb 10 02:34:01 PST 2004


Am Dienstag 10 Februar 2004 10:10 schrieb Scott Lanham:
> Am I being naive in thinking that OpenGL rendering can be done in a
> seperate thread?

Yep. In general, all drawing should be done in the main thread.
http://www.libsdl.org/faq.php?action=listentries&category=2#61

If you really want to do your OpenGL based drawing in a separate thread, you 
can use platform dependent functions (GLX) to make your GL context the 
current context in that thread (glXGetCurrentContext, glXGetCurrentDrawable, 
SDL_GetWMInfo, glXMakeCurrent).


Regards,
Johannes

< http://libufo.sourceforge.net >





More information about the SDL mailing list