Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0 Alpha
-
None
-
Qt 5.3
Description
This 'old' code correctly sets the bit depth:
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();
This 'new' code always uses 8-bit:
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();
When digging into the code, I found out that in the function qcgl_createNSOpenGLPixelFormat() the color depth nor the alpha depth is set.
Attachments
Issue Links
- relates to
-
QTBUG-37412 ARB::choosePixelFormat() does not take color depth into account
- Closed
For Gerrit Dashboard: QTBUG-37411 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
80610,6 | QOpenGLContext: Use color depth information from QSurfaceFormat | stable | qt/qtbase | Status: MERGED | +2 | 0 |