[Interest] QGraphicsView and QOpenGLWidget
maitai
maitai at virtual-winds.org
Sun Aug 2 18:13:16 CEST 2015
Hello,
I am experimenting with setting the viewport of a qgraphicsview to
qopenglwidget. It seems to work on windows and android (which I didn't
expect). I have some basic questions, I already know a bit of openGL but
I'm far from being an expert...
Is there any advantage to do that if you do not reimplement any GL
native painting for any item? In clear is it going to be any faster? For
instance for the time being I prefer to resize pixmaps using QPainter
and set them back to QGraphicsPixmapItem instead of resizing the
QGraphicsPixmapItem itself, but maybe it is going to be faster the other
way round now?
I also need to render the full view in an image (QPixmap or QImage)
quite often, so I was hopping that I could use
QOpenGLWidget::grabFrameBuffer() on the viewport instead of
QGraphicsView::render(), again to make it faster, but the only thing I
get from grabFrameBuffer is a plain black QImage...
Thanks for any tip or advise
Philippe Lelong
More information about the Interest
mailing list