Quad buffered stereo for sequential display

I have a nVidia QuadroFX board with quad-buffered stereo and I am trying to make use of this for a particular task. Basically, I want to display 4 images in rapid succession at 120Hz on Windows XP. I have set up the settings so that VSYNC is on so there is no image tearing.

I’m following all of the info I’ve found on the web, basically doing the following (pardon any syntax errors/typos here) :

frame = 0;

glDrawBuffer(GL_BACK_LEFT);
//Draw into this buffer with bitmap number frame
frame++;
glFlush();

glDrawBuffer(GL_BACK_RIGHT);
//Draw into this buffer with bitmap number frame
frame++;
if (frame>=4) frame=0;
glFlush();
SwapBuffers();

When I do this, I’m not seeing all 4 images. I see, basically, the average of frames 0 and 1 or frames 2 and 3.

What am I missing? Any ideas? I’ve tried a lot of experimenting to no avail. Thanks!

average of frames ? What do you mean ? If this persists even with blending disabled, then the averaging may come from the monitor or switched off shutter glasses or emitter. Do you have a 120hz compatible display ?

doing glFlush(); twice is not useful, doing it once right after SwapBuffers() should be way enough.

I have a 120hz display and the video mode is set to that. I say average because I am not wearing shutter glasses, just watching with the naked eye. At that rate, you’ll see the average of of the left and right frame unless you have the glasses on to swap between them.

What I am HOPING to see is the average of all 4 frames!

So you don’t actually need quad buffered stereo, just do :

glDrawBuffer(GL_BACK);
//Draw into this buffer with bitmap number frame
frame++;
if (frame>=4) frame=0;
SwapBuffers();

with a 120hz display context.
Just make sure you are able to render at 120fps.

Shouldn’t quad-buffering make this smoother? When I was using a non-quadro card and I did similar to the above, I was getting a lot of flashing. I’m testing with 600x600 bitmaps pre-loaded into memory… should be plenty of cycles/memory to render this at 120Hz, right?

Lots of flicker going on when I use the GL_BACK method, and only half the frames visible when I use quad-stereo. What’s going on? :slight_smile:

Thanks!

Sanity check : try wglSwapInterval(120); for 120 hz vsync : you should see exactly each one of the 4 images during exactly 1 second :
frame 0, during 1 second
frame 1, during 1 second
frame 2, during 1 second
frame 3, during 1 second
frame 0, during 1 second

If this is correct, well there is a different problem elsewhere…
If this is not correct, it should be easy to see how to make it correct.

What do you expect? You are seeing 4 different images in the time span of 33.3 milliseconds.
Depending on the difference in contrast between images your brain is not slow enough to “blend” those images into one.

A 240Hz display might do the trick.