Buffering

Has anyone managed to do quadruple buffering with any of their apps. or have any comments on it as a client wants images coming in from 4 cameras in real time.

Any pointers will be apporeciated.

thanks

gav

4 images as in 4 different images all displaying on the same screen at the same time? Just use glViewport to set the rendering area to one quarter of the screen, draw what one camera sees, and repeat for all the other cameras using different areas of the screen.

j

Not quite what I meant…
It is an opthalmic app that has two stereo cameras, basically 2 for right eye and two for left. So we will have 4 different image sources coming into the app and we need to read/process all of these in real time. I assume the best way would to have a quadruple buffer (hardware/OpenGL supported) to grab/process the images quick enough

Ok, I guess I misunderstood what you meant. Are you trying to capture these images and record them to disk, or do you already have them and want to display them on the screen?

If you want to capture them, OpenGL isn’t really what you want.

If you want to display the 4 images, do you want to display them in sequence, or have some stereo effect happening?

It should be possible to get a stereo buffer arrangement if your hardware supports it, so you could display either the view from the left eye or from the right eye in stereo. Or you could take one source from the left eye and one from the right to make a stereo view from both cameras.

Quadruple buffering is not supported by OpenGL.

j

From what I have been told so far I assume there is stereo imaging going on on a persons left and right eye, so you will get a stereo (depth) image of a persons left eye and one of the right eye, obtained from using a pair of cameras for each eye (or one stereo camera fo reach eye if you want to look at it like that), hell thsi is confusing… Well these images are grabbed and given to OpenGL…Now I am waiting for more details of if they are displaying hthose images, or want to build up a 3d image of each eye… we’ll see, I just wanted to know if we could buffer 4 images in OpenGL at one time as all 4 will need to be image processed at the same time and compared etc…

so what is multi buffering on some graphics cards then?

2D features
256-bit 2D acceleration, optimized for 32, 24,
16, 15, and 8-bit color depths, hardware cursor
in TrueColor, multi-buffering (2x, 3x and 4x for
flowing movement and video playback)

Not sure how applicable this is, but I did stereo displays in Irix GL once and it boiled down to this:

set the monitor to a stereo mode (lower resolution and higher refresh rate helps eliminate the flicker – 616x984 140Hz is what I happen to have used, but I’m sure it depends on a lot of factors (card, monitor, cpu, OS))

set double buffering and draw to the bottom half of the screen for one eye and the top half for the other eye. The buffer swaps take care of redraw like normal, but the monitor driver sequences the top-half and bottom-half to the appropriate eye (I can’t recall which is which).

But like I said, this was for Irix GL, so I’m not certain this is totally applicable.

When a video card says that they do multi-buffering they mean that they can queue up several frames to be displayed - so the card can be rendering 3 or 4 frames ahead of what is on the screen.

Either that or they mean that they can use off screen buffers in hardware, which doesn’t help you all that much.

j