Greets!
I read recently that it's possible to use OpenGL functions inside a QGraphicsItem's paint function, provided that you're working with an opengl surface. Is this something that's actually supported and will continue to work?
Greets!
I read recently that it's possible to use OpenGL functions inside a QGraphicsItem's paint function, provided that you're working with an opengl surface. Is this something that's actually supported and will continue to work?
Hi!
Qt Code:
void CGL3dProjectedItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter->beginNativePainting(); ... do your native gl... stuff painter->endNativePainting(); }To copy to clipboard, switch view to plain text mode
These two functions begin/endNativePainting() were introduced recently in 4.6 just for the purpose of making intermixing safer.
http://labs.trolltech.com/blogs/2010...rmance-opengl/ see section mixing..
The QtOpenGL bindings are just a convenience-wrapper. For more advanced stuff it is expected to use opengl directly.
Joh
Bookmarks