SVGAlib: how to do page flipping without virtual framebuffer

SVGAlib: how to do page flipping without virtual framebuffer

Post by Frank Lofa » Wed, 05 Apr 1995 04:00:00

I am writing a renderer which supports (among other things) SVGALIB
under linux. I want to make it as fast as possible. So I tried
switching from a virtual framebuffer using gl_setcontextvgavirtual to
direct vga access using gl_setcontextvga. I can not get page flipping
(using gl_enablepageflipping) to work right at all without a virtual
frame buffer. When not using a virtual framebuffer, the value of VBUF
I get from svgalib does not change, even when I use gl_copyscreen to
switch pages. So my renderer always renders on one screen, which is
wrong. it should by rendering on the right screen at the right
time. The renderer can handle the framebuffer address being changed
(which is necessary for double/triple buffering), but without knowing
what to change it to, I am hosed. I don't know where the current
screen is in memory. If I could get SVGAlib to tell me where the
current screen to be written to is, or how to calculate it, it would
really help.

So my question is, how do I use page-flipping with direct writes to
the VGA memory, instead of a virtual framebuffer?

This is with linear 320x200x256color mode.

The docs with SVGALIB (1.2.5) really need improvement. Nice package,
but the only way I cat get anywhere is by looking at pre-existing code
and the SVGAlib sources (which can really be a pain).


1. Page flipping with svgalib

Hello.  I'm porting a simple graphics program from Borland style
graphics under DOS to svgalib under linux.  It uses the Borland
setactivepage() and setvisualpage() functions, and I've been somewhat
overwhelmed in trying to find equivalent functionality in svgalib/gl.

Can someone point me to the necessary functions to do minimal page
flipping?  Nothing fancy, 640x480x16 or better, and I only need two
pages :) (before anyone mentions it, I've seen the BGI compatibility
library--I don't want it, I don't need it, and I'd rather learn how to
do it with svgalib).

Thanks a lot,
John Wiseman

2. Script CDE keystrokes

3. SVGALib and framebuffers on Intel/AMD

4. Executing a program in C/C++

5. framebuffer and svgalib

6. How to increase timeout of outgoing ppp connection

7. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

8. linux1.3.30+ and ncsa HTTPD

9. Paging out (Usage of Virtual Memory) of persistant pages

10. 2.5.41 Vesa framebuffer hang on fontchange without 8x16 font

11. Virtual Console to Framebuffer Mapping

12. Virtual Framebuffer

13. Virtual framebuffer driver - mmap problem