0

I'm trying to do a stereoscopic visualization in Qt. I have found some tutorials but all of them use the older QGLWidget and the buffers GL_FRONT_LEFT and GL_FRONT_RIGHT.

AS I'm using the newer QOpenGLWidget I tried drawing images to the same buffers but the call to glDrawBuffer(GL_FRONT_LEFT) is generating a GL_INVALID_ENUM.

I also saw that the default buffer is GL_COLOR_ATTACHMENT0 instead of GL_FRONT_LEFT so I imagine I need to use a different set of buffers to enable stereo.

Which buffers should I use?

Daniel
  • 21,933
  • 14
  • 72
  • 101
  • I believe the buffers would be ``GL_FRONT_LEFT`` and ``GL_FRONT_RIGHT`` according to the OpanGL-Reference. – Sebastian Lange Mar 17 '15 at 06:22
  • Hello, When I call: glDrawBuffer(GL_FRONT_RIGHT) it generates the error GL_INVALID_ENUM. And it's the same for glDrawBuffer(GL_FRONT_LEFT);. – Daniel Mar 17 '15 at 17:07
  • That's because `QOpenGLWidget` internally uses an FBO (for whatever reason). I don't know if they implement anything for stereoscopic rendering. – derhass Mar 17 '15 at 22:08

1 Answers1

0

you should use

glDrawBuffer(GL_BACK_RIGHT); glDrawBuffer(GL_BACK_LEFT);

look this link

I am working on the same thing with Nvidia Quadro 4000 . No luck yet, I got 2 images slightly offset, the IR tansmitter light up BUT the screen flicker!

GOT IT: the sync was 60hz, I put it to 120 and everything works fine I still need work on the right/left frustrum to say eureka.

Tiblemont
  • 191
  • 6