[SDL] SDL event loop

Franki c7liu at uwaterloo.ca
Sun Jan 30 08:31:59 PST 2005


On Monday 17 January 2005 12.53, Kostas Kostiadis wrote:
> > Depends on your CPU/GPU performance ratio (SDL blitting is 100%
> > software when using SDL with OpenGL), but my guess is that your
>
> Ouch!...Is there an alternative?
> I'm guessing it's not just a case of changing the
> SDL_CreateRGBSurface call to use SDL_HWSURFACE ;-)

Nope, at least not yet. Maybe the glSDL backend will be able to 
accelerate surface->surface blits eventually, if the right OpenGL 
extensions are in place.

Anyway, do you really have to render new textures all the time? Even 
"dynamic" text can't be all *that* dynamic, provided anyone's 
actually supposed to be able to read it. :-)

Scrolling, rotation, fading, zooming, shearing etc can be done with 
OpenGL when rendering the pre-rendered textures to screen, so you 
should only have to render a new texture every now and then, 
normally. If that takes too long (hickups in the frame rate whenever 
you render a new texture), you can probably do it piece by piece "in 
the background", or actually in the background by means of a worker 
thread.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---




More information about the SDL mailing list