PDA

View Full Version : accumulation buffer + quad buffer



gunslinger
05-09-2007, 02:17 AM
hi opengl users,

i am doing some tests with fullscene antialias
and active stereo.

Right now i am able to do quad buffer stereo and
full scene antialias (via the algo of the redbook),
but i am not able to do both at the same time.

The basic problem is that in the rendering loop i do something like:




for (i=0;i<8;i++) // antialias 8x
{
jitter the frustum

draw the scene

glAccum (GL_ACCUM, 1.0/8.0);
}

glDrawBuffer(GL_BACK);
glAccum (GL_RETURN, 1.0);

obviously the problem is that i am using the same accumulation buffer for both left and right eye,
i should be able to split the buffer input/output while rendering to keep the channels separated.

Does anyone has done something similar? Any hint?

Since i am using a 3rd part engine, i have not a big control about the rendering process itself...

Relic
05-09-2007, 06:03 AM
GL_BACK in a stereo context means GL_BACK_LEFT and GL_BACK_RIGHT simultaneously.
glReadBuffer can only specify one, so glAccum is only ever using left or right and that means it's also only of the size of one color buffer, not both left and right.

The correct way would be something like this:

Since i am using a 3rd part engine, i have not a big control about the rendering process itself... If you're not able to set the read and draw buffers yourself, you're stuck.