[SDL] Double buffering in windowed and fullscreen modes

David Olofson david.olofson at reologica.se
Fri Aug 31 09:41:01 PDT 2001


On Friday 31 August 2001 17:28, Tyler Montbriand wrote:
> Pete Shinners wrote:
> > i'm guessing you're running windows? in any event SDL doesn't
> > do hardware surfaces for windowed displays. :[
> > what resolution are you running at?
>
> No hardware acceleration for windowed surfaces?  Will this be fixed in
> SDL1.3?

AFAIK, no. Windows doesn't support it - and cannot, without hardware 
based clipping. DirectX allows you to blit to the "screen" surface of a 
window and does clipping internally, but if you were allowed to lock the 
surface and access VRAM directly, you'd have to deal with clipping 
yourself not to overdraw other windows, mouse pointer (unless it's a 
hardware sprite), menues etc.


> 1280*960*16bpp, though the res doesn't seem to matter; windowed, I
> always get a uniformly bad 50fps.

Weird... Does it make a difference if you use SDL_UpdateRect() for a 
(very) small region of your window?


> At fullscreen it maxes out at my
> monitor's refresh rate of 85Hz,

Sounds reasonable.


> even though each SDL_FillRect() takes a
> full two milliseconds for some reason.

Any rectangle size, or for the whole screen? (In the latter case, you're 
getting just about the expected performance, I think. Quite OK, I'd say.)


> SDL claims that colorfills are
> hardware accelerated with my card, yet...

Hmm... Are you doing alpha blending or something?


//David Olofson --- Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------------> http://www.linuxdj.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david at linuxdj.com -'




More information about the SDL mailing list