[Qt-interest] Using QPainter in QGLWidget on OSX with Radeon cards draws in black ...
David Geldreich
david.geldreich at free.fr
Tue Jun 21 17:53:43 CEST 2011
Hi all,
Finally this was a bug in the Radeon X1000 driver
QPainter OpenGLV2 engine is using GLSL shader which has a bug with Radeon X1000
This shader give a black result
vec4 srcPixel() { return fragmentColor; } void main() { gl_FragColor = srcPixel(); }
Where
void main() { gl_FragColor = fragmentColor; }
works fine
The workaround is to test if there is a Radeon X1000 cards on the machine. If yes, force OpenGLV1 engine
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
Regards.
David
Le 21 juin 2011 à 01:03, David Geldreich a écrit :
> FYI, I just downloaded the qt-4.7-stable sources from Git to be able to run the OpenGL autotest and they all fail with the Radeon card.
>
> Submitted
>
> Le 20 juin 2011 à 16:57, David Geldreich a écrit :
>
>> Hi all,
>>
>> we are experiencing a strange behavior with Qt 4.7.1 (reproduced with Qt 4.6.4, Qt 4.7.3) on OSX SnowLeopard (10.6) and Leopard (10.5) when using an ATI Radeon graphics card.
>>
>> We discovered this by using a QGLWidget as QGraphicsView's viewport.
>>
>> When using a QPainter in a QGLWidget, the color seems to be "ignored", all the primitives are drawn in black.
>>
>> I attach an example to reproduce. If I force OpenGL paint engine instead of OpenGL2, the problem "disappear" !!
>>
>> Anyone experienced a similar problem ?
>>
>> Regards.
>>
>>
>> <main.cpp>
>
More information about the Qt-interest-old
mailing list