Quad-buffered OpenGL stereo does not display both buffers
When using quadrant stereo with my application, my graphics card supports quadrant stereo (Quadro 5000 / PCIe / SSE2), only one buffer is shown on the screen, I use oversaturation and openGL with vbos arrays, I initialize oversaturation like this:
int type = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STEREO;
glutInitDisplayMode(type);
glutInitWindowSize(width,height);
win = glutCreateWindow(title.c_str());
glutSetWindow(win);
GLenum err = glewInit();
if (GLEW_OK != err) {
fprintf(stderr," ## ERROR: %d: %s\n",
(int)err,(char*)gluErrorString(err));
}
glutDisplayFunc(loop_function);
and when drawing here, I fill both buffers:
glDrawBuffer(GL_BACK_LEFT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
camera->OnMouseMotion(sf::Vector2i(-100,0));
camera->look();
for (auto i = objects->cbegin(); i != objects->cend(); ++i)
(*i)->draw(camera);
glDrawBuffer(GL_BACK_RIGHT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
camera->OnMouseMotion(sf::Vector2i(200,0));
camera->look();
for (auto i = objects->cbegin(); i != objects->cend(); ++i)
(*i)->draw(camera);
camera->OnMouseMotion(sf::Vector2i(-100,0));
camera->look();
glutSwapBuffers();
For both eyes, only the right buffer (last) is displayed. I first tried drawing the right buffer, but then the display is empty (none are drawn) OnMouseMotion does indeed move the mouse according to the position, and I know my movements are not set properly, but now I am focusing on displaying two different images, one for the right eye, the other for the other. Did I forget something? or maybe the gl calls are wrong?
source to share
No one has answered this question yet
Check out similar questions: