[SDL] Re: why the sdl window is always top most in windows?

Gabriele Greco gabrielegreco at tin.it
Tue Jul 23 08:59:01 PDT 2002

On Tue, 2002-07-23 at 17:27, Pete Shinners wrote:
> SDL is using your video card's "video overlay" planes. this is a special 
> part of video card memory that lives in a different colorspace than the 
> normal rgb desktop. this video overlay is always on top of anything else on 
> the screen (sort of like how video cards usually draw the mouse in a 
> separate overlay, so nothing can cover it)

This is not necessary true.

DirectX supports colorkeying overlay with most cards (at least NVIDIA
and Matrox ones), this method is used also by XVideo extension as

So SDL hw overlays DON'T stay on top of every window in the X enviroment
(with Xvideo extension) but they does in win32 enviroment since the SDL
overlay support use the "simple" overlay method and not the colorkey

I suppose they use the simple one since directx colorkeying has a lot of
problems with 16bit depth desktops where you risk to get you colorkey
color dithered by windows. Anyway these problems can be avoided, I hope
to see a more complete win32 overlay implementation in the next versions
of SDL (I don't dare to do it myself since I hate directx programming,
never seen a wrost API, expecially for 2d and sound stuff, also C=64
GEOS was more friendly... )


More information about the SDL mailing list