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
buffering code…
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
I have tried to do this, but when use the SDL_DOUBLEBUF with dga
SDL_SetVideoMode causes a Segmentation Fault. Bug?
I 'm using sdl 1.2.2 that comes with debian sid an X 4.1.0 with
nvidia tnt2, perhaps it helps youOn Sat, 08 Sep 2001 14:40:10 -0700 Sam Lantinga wrote:
–
Sebastian Garcia <@Seba>
Usuario Linux registrado #225450
Debian GNU/Linux ‘Sid’ kernel 2.4.9 sobre AMD K6 II
Hm, nice, but is there any way of doing this without having to run
the program as root ?
Actually, there is. I wrote a patch for the DGA library that will
allow you to use DGA as a user that has access to the framebuffer
console, if the framebuffer console is properly configured.
Your mileage may vary…
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
-------------- next part --------------
diff -u -r1.14 XF86DGA2.c
— XF86DGA2.c 2000/05/23 04:47:35 1.14
+++ XF86DGA2.c 2000/08/29 15:53:10
@@ -23,6 +23,9 @@ #include “extutil.h” #include <stdio.h>
+#if defined(linux) /* Needed for framebuffer console support */
+#include <linux/fb.h>
+#endif
/* If you change this, change the Bases[] array below as well */ #define MAX_HEADS 16
@@ -909,7 +912,31 @@
if (!name)
name = DEV_MEM;
if ((pMap->fd = open(name, O_RDWR)) < 0)
+#if defined(linux)
{ /* /dev/fb0 fallback added by Sam Lantinga <@slouken> */
/* Try to fall back to /dev/fb on Linux - FIXME: verify the device */
struct fb_fix_screeninfo finfo;+
if ((pMap->fd = open("/dev/fb0", O_RDWR)) < 0) {
return False;
}
/* The useable framebuffer console memory may not be the whole
framebuffer that X has access to. :-(
*/
if ( ioctl(pMap->fd, FBIOGET_FSCREENINFO, &finfo) < 0 ) {
close(pMap->fd);
return False;
}
/* Warning: On PPC, the size and virtual need to be offset by:
Ok, all this is nice, but i’d love if there was a standard way of
doing this in X… What about the doublebuffer extension ?On Sunday 9. September 2001 16:29, you wrote:
Hm, nice, but is there any way of doing this without having to
run the program as root ?
Actually, there is. I wrote a patch for the DGA library that will
allow you to use DGA as a user that has access to the framebuffer
console, if the framebuffer console is properly configured.
Your mileage may vary…
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
Ok, all this is nice, but i’d love if there was a standard way of
doing this in X… What about the doublebuffer extension ?
that extension (DBE) is rarely implemented efficiently at all, and
where it is usually requires special hardware only present on
workstations from certain vendors. In other words, it’s not worth the
trouble
It’s a bit like the SYNC extension — at first it seems exactly what
you are looking for, and it then turns out to be useless when you take
a closer look
that extension (DBE) is rarely implemented efficiently at all, and
where it is usually requires special hardware only present on
workstations from certain vendors. In other words, it’s not worth
the trouble
Any chance this will be supported by more standard hardware in the
future ? In X that is… Getting offtopic again =]
It’s a bit like the SYNC extension — at first it seems exactly
what you are looking for, and it then turns out to be useless when
you take a closer look
– 8< –
The double buffer extension is supported on all hardware in XFree86
by using pixmaps for the back buffers. No special hardware features
are required. The only time it is not offered is in Xinerama.
– 8< –
So … ?On Monday 10. September 2001 22:22, you wrote:
that extension (DBE) is rarely implemented efficiently at all,
and where it is usually requires special hardware only present on
workstations from certain vendors. In other words, it’s not worth
the trouble
Any chance this will be supported by more standard hardware in the
future ? In X that is… Getting offtopic again =]
It’s a bit like the SYNC extension — at first it seems exactly
what you are looking for, and it then turns out to be useless
when you take a closer look
The double buffer extension is supported on all hardware in XFree86
by using pixmaps for the back buffers. No special hardware features
are required. The only time it is not offered is in Xinerama.
in other words, it doesn’t do anything we can’t do ourselves using pixmaps,
so it’s fairly useless
“Mattias Engdeg?rd” schrieb im Newsbeitrag news:mailman.1000198083.27429.sdl at libsdl.org…
Trick wrote:
The double buffer extension is supported on all hardware in XFree86
by using pixmaps for the back buffers. No special hardware features
are required. The only time it is not offered is in Xinerama.
in other words, it doesn’t do anything we can’t do ourselves using pixmaps,
so it’s fairly useless
If it doesn?t use VSYNC it is useless ( on LINUX )