[Development] Problem with QOpenGLContext?
Kurt Pattyn
pattyn.kurt at gmail.com
Tue Mar 11 15:05:28 CET 2014
Hi Morten,
I reviewed the patch (no, it won’t work).
Accidentally I already submitted a (working) patch: https://codereview.qt-project.org/#change,80610
Cheers,
Kurt
On 11 Mar 2014, at 15:00, Sorvig Morten <Morten.Sorvig at digia.com> wrote:
> Will this patch work?
>
> https://codereview.qt-project.org/#change,80620
>
> Morten
>
>
> On 11 Mar 2014, at 12:12, Kurt Pattyn <pattyn.kurt at gmail.com> wrote:
>
>> 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
>>
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
>
More information about the Development
mailing list