[Development] Problem with QOpenGLContext?
Kurt Pattyn
pattyn.kurt at gmail.com
Tue Mar 11 11:28:29 CET 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140311/95c1e291/attachment.html>
More information about the Development
mailing list