[SDL] SDL_GetVideoInfo strangeness

Darrell Walisser walisser at mac.com
Sun Nov 30 12:56:00 PST 2003


On Nov 30, 2003, at 3:01 PM, sdl-request at libsdl.org wrote:

> Message: 9
> From: John Philip <phip at spymac.com>
> Subject: Re: [SDL] SDL_GetVideoInfo strangeness
> Date: Sun, 30 Nov 2003 01:56:37 -0500
> To: sdl at libsdl.org
> Reply-To: sdl at libsdl.org
>
> On my Mac OS X system, calling SDL_SetVideoMode(SDL_HWSURFACE |
> SDL_FULLSCREEN | SDL_DOUBLEBUF) results in a surface with the following
> flags:
>      SDL_HWSURFACE
>      SDL_NOFRAME
>      SDL_PREALLOC
>      SDL_DOUBLEBUF
>      SDL_FULLSCREEN
>
> This SDL_Surface for the screen claims to be a hardware surface, is it
> really?

No, we are emulating page-flipping behavior in this case, primarily for 
the benefit of retrace-synchronized updates. The screen surface is 
actually a software surface that updates to the screen in another 
thread and in sync with the monitor (60hz on LCDs w/ADC or DVI). We had 
to use SDL_HWSURFACE for compatibility with other platforms, otherwise 
I'd leave it out to avoid the confusion.

> If so, SDL_GetVideoInfo() should be returning hw_available =
> true, and probably some other fields true as well.

Not necessarily. Even if we did have a true hardware screen surface, 
that does not imply that the implementation can perform hardware 
accelerated blits/fills. This is the case with a single-buffered 
hardware surface on Mac OS X, and probably with other targets as well.





More information about the SDL mailing list