Threads and video

This is from the docs:

Don’t call SDL video/event functions from separate threads.

I develop a game that uses opengl in a different thread that loops (with
SDL_GL_SwapBuffers() at the end). Is that wrong? It works for me…

This is from the docs:

Don’t call SDL video/event functions from separate threads.

I develop a game that uses opengl in a different thread that loops (with
SDL_GL_SwapBuffers() at the end). Is that wrong? It works for me…

Under Win32 it is necessary that the thread that initializes the window
must process the events. I don’t know if this is the only limitation,
but this is the one I experienced with ASC.
If you process the events in a different thread, some things like

  • moving the window around
  • pressing the icons in the title bar
  • redrawing the window if I move it from background to foreground
    don’t work any more. Since ASC doesn’t use OpenGL and can run in a
    window, I don’t know if these problems matter for a fullscreen OpenGL
    app…

Bye,
MartinOn Fri, 27 Apr 2001 05:12:18 -0700, Pontus Marktr?m wrote: