PDA

View Full Version : check to see if quad-buff stereo available; coin3d / Qt



vonCZ
15th August 2007, 09:23
The Qt part of my application is an interface to a Coin3d scenegraph. I've created a widget to select stereo options in the Coin3d scene. Most people's graphics cards/set-ups won't support quad-buffered stereo, of course. In this case, in my Qt menu I want to:


quadBuffAction->setDisabled(true);

Is there a method in Qt to check whether or not quad-buffered stereo is supported on a given computer? I tried:



vuSterQGLF = new QGLFormat;
vuSterQGLF->setStereo(true);
if(vuSterQGLF->stereo())
{
qDebug("stereo returns true");
}


...but this returned true, even though my graphics set-up doesn't support quad-buff.

As far as I can tell, Coin3d doesn't have a specific method to test whether or not quad-buffered stereo is available on a given computer; instead, if the user selects quad-buff--and it's not available--it simply doesn't activate it.

So another option available to me, i guess:

1. try to go quad-buff in the Coin3d constructor
2. getStereo(); if not quad-Buff
3. quadBuffAction->setDisabled(true);
4. reset to mono

what think? Seems inelegant... and might cause problems on some computers.