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