Some more information. I work on OSX. When digging into the platform specific implementation, I detected that in the method qcgl_createNSOpenGLPixelFormat() the color depth nor the alpha depth is not set. If it is not set, it defaults to the screen color depth, which is 8-bit in my case. I will file a bug report for that.
Cheers, Kurt On 11 Mar 2014, at 11:28, Kurt Pattyn <[email protected]> wrote: > Hi, > > as I understand correctly the ‘old’ QGLxxx classes will be replaced by new > QOpenGLxxx classes. > I tried the following code below, and found out that QGLContext is correctly > setting the color depth, > while QOpenGLContext always defaults to 8. > > QSurfaceFormat ogfrmt; > ogfrmt.setRedBufferSize(6); > ogfrmt.setGreenBufferSize(6); > ogfrmt.setBlueBufferSize(6); > QOpenGLContext *oglc = new QOpenGLContext; > oglc->setFormat(ogfrmt); > oglc->create(); > qDebug() << "QOpenGLContext red buffer size:" << > oglc->format().redBufferSize(); > > QGLFormat gfrmt; > gfrmt.setRedBufferSize(6); > gfrmt.setBlueBufferSize(6); > gfrmt.setGreenBufferSize(6); > QGLContext *glc = new QGLContext(gfrmt); > glc->create(); > qDebug() << "QGLContext red buffer size:" << > glc->format().redBufferSize(); > > > Is this a known bug, or is the above code simply wrong? > > Cheers, > > Kurt
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
