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

Reply via email to