In XFree86 style fullscreen mode, have your virtual resolution at
least twice the X or Y of the desired fullscreen mode. IE you’ll
have to be running at least 1280x980 to do 640x480.
Switch to a 640x480 modeline, but split up the screen into 640x480
sections. Pan the display to whatever piece you want displayed.
Ta da. Double, triple, or even quadruple buffering.
And you can even do snazzy hardware scrolling tricks with this.
Knowledge of the old ways is useful.
Neat! Will SDL do this buffer-trickery in the future ? That would be
great, so that i wouldn’t need any system-dependent stuff in the
Well if someone wants to implement it…
I have a patch I’m working on that makes SDL do fullscreen properly on
Xinerama. Anyone out there want to help test this for me?
Basically, it stops SDL from assuming +0+0 for the coordinates of the
fullscreen window, which doesn’t work when there’s a display to the left
of the primary display. The xvidmode extention flips the primary screen
into whatever resolution wanted, but then the window is displayed on the
I’ve got a quick patch that fixes this by querying the Xinerama
extention and figuring out where the primary screen is, still has some
problems, but at least Dose2 displays properly now. Whoo.
After I get this worked out, I suppose I could work out how to implement
the doublebuffering hack.
What would be really neat, is for SDL to become more multihead aware, IE
you could open a fullscreen rendering context on each head. However
the XF86vidmode extention doesn’t seem to be multihead aware yet (Stupid
stupid stupid…) you can’t do resolution switching until it is…