Reputation: 23015
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?
Upvotes: 0
Views: 631
Reputation: 943
I wrote a rather simple OpenGL program to test "can I use stereo on this computer" it should be easy to build/run with CMake and Visual Studio
It doesn't use Qt, but it will tell you if OpenGL Stereo really-really-works at the moment
Upvotes: 1