[Qt-interest] Bug in OpenGL impl on Mac?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon Jan 3 14:11:00 CET 2011
On 2011-01-02 John John Clayton wrote:
> ...
> I've got a simple piece of example code that uses qgraphicsview to draw one
> texture, and one text item - all using a QGLWidget backed QGraphicsView. The
> texture has a yellow rect drawn around it using the QPainter APIs,
> text is drawn using the QGraphicsTextItem object.
I have a QGraphicsPixmapItem based QGraphicsView and I quickly tried setting a QGLWidget has painting widget. The pixmaps have some transformations (scale, rotate) applied, nothing fancy. But it works well on Mac OS 10.6.5 on an iMac 24" which is about 3 years old (graphics card? Don't know ;) - I think it is the previous generation of iMacs (the aluminium ones), not the latest one.
The above was tested with Qt 4.7.1 Cocoa (binary distribution), default painting system (that is, no -graphicssystem command line switches set or so).
Anyway, setting the command line option -graphicssystem opengl (or was it even opengl2?) deserves the predicate "experimental" very much: Missing UI elements, some are totally wrongly drawn (e.g. missing lines of "Group widgets"), ... but the QGraphicsScene with pixmaps painted on it seems to work well.
Then on the other hand, setting -graphicssystem raster (or was it rasterengine?) also produces "artifacts", to say the least: it starts with multiple selection not properly working in QGraphicsScene/View (sometimes the "selection rectangle" is not visible when CMD + mouse-clicking), and recently I somehow even managed that the entire UI is drawn upside down (and I am talking about the toolbar, the sidepanel and the buttons!) when randomly CMD-clicking onto my scene! The same code works flawlessly with the Raster paint engine on Linux (Kubuntu 10.10) and also on Windows XP (I /guess/ by now the Raster engine is the default on Windows, no? Have not yet explicitly checked).
Unfortunately I have yet to come up with a small example which reproduces this behaviour. A small QGraphicsScene with 3 QGraphicsPixmapItems programmatically added to it did WORK however, so it must go together with the transformations (scale, rotate, translate) I apply to the items.
But I am getting to another topic, sorry about that ;) Just to say that I'd also like to see some more love on the Mac painting system ;) Once I can reliably reproduce this Raster Engine behaviour I will come up with more (oh and yes, the SAME code works perfectly on Mac with the default native paint engine != raster, but unfortunately then I hit another bug: http://bugreports.qt.nokia.com/browse/QTBUG-15663 "QPainter: graphical artifacts when drawing QPixmap with alpha and transformations"
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list