[SDL] glSDL backend

Stephane Marchesin stephane.marchesin at wanadoo.fr
Wed Jan 5 10:21:01 PST 2005


Murlock wrote:

> Stephane Marchesin wrote:
>
>
>>
>> Video driver should be "glSDL", not "windib".
>>
>> Stephane
>
>
>
> Arff... ;)
>
> It's OK, slower than my other filters (eagle, sai2x, ...) but my game 
> use a lot of small SDL_UpdateRect so I suppose that the time to upload 
> thoses to a new opengl texture consumes much times...

SDL_UpdateRect is a glFinish() call when in single buffer mode. So use 
as few as possible.
That said, your performance problem is probably something else. I think 
most potential problems are described there :
http://icps.u-strasbg.fr/~marchesin/sdl/glsdl.html

>
> Otherwise, is it possible to use the capacities of OpenGl to change 
> the size of viewport without change of logical size of software ?

Yes, I've implemented that as another backend :
http://icps.u-strasbg.fr/~marchesin/sdl/sdl_glscale.patch
Don't forget to set SDL_VIDEODRIVER=glscale ;)
and if you want to specify the size, set SDL_VIDEODRIVER_GLSCALE_X and 
SDL_VIDEODRIVER_GLSCALE_Y to the size you want. It scales by a factor of 
2 by default.

Stephane







More information about the SDL mailing list