[SDL] Re: moving screen when u change resolution

Stephane Marchesin stephane.marchesin at wanadoo.fr
Mon Jan 31 11:52:01 PST 2005


Bob Pendleton wrote:

>
>I'd be surprised if that one every became available through a C API. It
>is a hack that is only supported by a small number of video drivers.
>Making it an environment variable means that only the drivers that
>support it need to even be aware that it exists. OTOH, making it a
>standard part of SDL means that *every* driver has to have code to
>handle it, even if all the code does is return an error message. 
>
The nice thing about a backend selection API is that you don't need 
support from all the backends :)

>
>The same thing is true of the SDL_VIDEO_CENTERED but a flag is a lot
>easier to ignore than an API.
>
>>SDL_AUDIODRIVER (plus some way of enumerating available audio drivers)
>>
>
>In most cases video and audio driver selection is moot. You rarely have
>more than one choice. When you do it is usually the case that one is
>automatically used as a fall back for a better driver. Or, in some cases
>the alternative driver requires special permission to use. Consider the
>difference between the X driver and the other Linux drivers. Anyone can
>run an SDL_X11 program, but using the DGA requires you to have root
>privileges. On windows, when would you use the DIB driver if you could
>use the DirectX driver?
>
If your application is alpha blitting intensive you don't want the 
DirectX driver, because alpha blits to screen will become prohibitively 
expensive.

Similarly, you don't want to use glSDL if your application wasn't tuned 
for it, because you will very likely get very bad performance.

Also, if the application has the backend selection interface available, 
it can in turn give the user a friendly interface to choose betwen the 
different audio/video backends. Not everyone knows how to setup an env 
variable.

That said, such a mechanism would probably be the cause for a lot of 
trouble too.

Stephane







More information about the SDL mailing list