[SDL] rendering from a different thread.
onefriedrice at brokenzipper.com
Thu Jan 3 21:47:39 PST 2008
And then you just add a mutex so that the game scene structures aren't
modified while the scene is being drawn? This seems like a nice way to go.,
decoupling the drawing code and just letting it take off with vsync on.
What platforms have you tried this on?
----- Original Message -----
From: "Peter Ketting" <peterketting at sysmatrix.net>
To: "A list for developers using the SDL library. (includes SDL-announce)"
<sdl at lists.libsdl.org>
Sent: Thursday, January 03, 2008 10:33 PM
Subject: Re: [SDL] rendering from a different thread.
>> afaik you can only render in the main thread - at least, I've tried
>> to no avail.
>> SDL docs seem to support this.
> I've succesfuly rendered using a seperate thread and it worked
> just as suspected. The way I did it was to set up a render thread
> which rendered the graphics constantly, while a timer signaled the
> main thread to process the game logic at a constant frame rate.
> SDL mailing list
> SDL at lists.libsdl.org
More information about the SDL