I want to use stereoscopic 3D in a C++ Qt application in an QOpenGLWidget
.
The code I currently have is:
QSurfaceFormat format;
format.setDepthBufferSize(24);
//format.setOption(QSurfaceFormat::StereoBuffers, true);
format.setStereo(true);
setFormat(format);
But that code is causing a EXC_BAD_ACCESS
as soon as I try to display the Window.
I have tried with both setStereo
and setOption
as you can see above, but both crash.
How could I know if stereoscopic 3D is supported to avoid calling those lines when it is not?