View Full Version : QglWidget: get depth buffer allowed values

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?

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.

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!