[Development] Accelerated/OpenGL drawing under Qt 5.0

Samuel Rødal samuel.rodal at nokia.com
Thu Sep 13 10:57:15 CEST 2012


On 09/12/2012 04:33 PM, ext Chris Meyer wrote:
> On Tue, Sep 11, 2012 at 9:52 PM, Chris Meyer <cmeyer1969+qt at gmail.com> wrote:
>> My software makes use of accelerated drawing using the techniques with
>> QGraphicsView and QGraphicsScene shown in this article:
>>
>> http://doc.qt.nokia.com/qq/qq26-openglcanvas.html
>>
>> Unfortunately things don't work smoothly under Qt 5.0.
>>
>> Is this technique expected to work? If not, what is the suggested way
>> to get accelerated drawing under Qt 5.0?

It should still work, though there could still be bugs at this stage.

>> Also, QGLPixelBuffer::hasOpenGLPbuffers() always returns false, where
>> it returned it true under 4.8. Is this also expected?

Hmm, I see that for now the QGLPixelBuffer implementation is stubbed out
in Qt 5. I'd recommend using QOpenGLFramebufferObject instead, as pixel
buffers are a pretty deprecated way of doing offscreen rendering with
OpenGL these days.

> As a further isolation of this problem... I'm finding that adding a
> QGLWidget (not even customized) into my view hierarchy (QMainWindow ->
> QWidget/QVBoxLayout -> QStackedWidget -> QWidget/QVBoxLayout ->
> QGLWidget) makes bad things happen to layouts, displays and mouse
> handling.
> 
> Anyone have success with QGLWidget in a complex hierarchy on Qt 5.0 /
> Mac OS 10.8.1? Any known issues?
> 
> This issue looks similar, but I'm seeing it on the Mac:
> https://bugreports.qt-project.org/browse/QTBUG-26826

I'd suggest you create a separate task for it, with a simplified example.

--
Samuel



More information about the Development mailing list