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).