On Fri, 21 Apr 2000, [iso-8859-1] Niklas Höglund wrote:

> On Thu, Apr 20, 2000 at 09:02:58PM -0400, Stefan Seefeld wrote:
> > [EMAIL PROTECTED] wrote:
> > > 
> > > I can't figure out how to use db to prevent flickering.
> > > 
> > > I create a visual with 2 frames, associate a ggimesa context to it.
> > > I want to render openGL and then use ggiPuts on the visual.
> > 
> > We had the same trouble six months ago when we tried to set up berlin
> > on /dev/fb for a conference. As far as I can tell Jon faked double buffering
> > simply by letting both pointers point to the same buffer.
> 
> Yes, it looked like a hack in the ggiglut source when I looked at
> it. 

        No, it is in GGIMesa itself.

> If I remember correctly, I got around the problem by using a
> screen mode twice as wide as I needed and using ggiSetOrigin to change
> what's visible. 

        That is how Uwe's original GGIMesa code used to implement double
buffering.  The problem with that is that it won't work on targets which
don't support doubled virtual yres (= most targets), and a lot of GL demo
code required double buffering.  This implies that the double buffering
impementation code should be target-specific, where it will automatically
allocate two buffers on hardware which supports it, fall back to
ypan/setorigin if not, or fall all the way back to a memory visual (or my
hack) if not there too.  That's quite a bit of code, so I figured that the
most functional QuickHack would be to point both buffers to the same
physical framebuffer.  It looks like crap but it works.  Not that there's
much point in it now, since I haven't yet gotten around to writing an
doublebuffer-accelerated GGIMesa target yet....

Jon

---
'Cloning and the reprogramming of DNA is the first serious step in 
becoming one with God.'
        - Scientist G. Richard Seed


Reply via email to