PDA

View Full Version : QglWidget: get depth buffer allowed values



papillon
28th November 2011, 11:43
There is a possibility to gather depth buffer possible values so that I know, prior calling QGLFormat::setDepthBufferSize, if the system supports 24 or 32bit depth buffer size?

Oleg
28th November 2011, 12:10
Maybe using QDesktopWidget::depth() will help?



int depth = qApp->desktop()->depth();


But it will return the current depth really, not all supported.

papillon
28th November 2011, 16:18
Thank you very much Oleg. It doesn't really matter if I can't get all the depth buffer sizes supported; setting the Qt application to use the actual desktop depth is OK!