[Interest] QuickFrameBufferObject does not redraw

Agocs Laszlo laszlo.agocs at theqtcompany.com
Wed Sep 16 10:19:52 CEST 2015


You most likely have some state set that affects your custom rendering. For example you will probably have a program active which is not ideal in your case. Try adding a glUseProgram(0).

See the slightly enhanced 5.5 docs at http://doc.qt.io/qt-5/qquickframebufferobject-renderer.html#render

Best regards,


From: interest-bounces+laszlo.agocs=theqtcompany.com at qt-project.org <interest-bounces+laszlo.agocs=theqtcompany.com at qt-project.org> on behalf of Wehmer, Matthias <Matthias.Wehmer at draeger.com>
Sent: Wednesday, September 16, 2015 8:34 AM
To: interest at qt-project.org
Subject: [Interest] QuickFrameBufferObject does not redraw

Hi everybody,

I am currently experimenting with the QFrameBufferObject and try to draw via raw OpenGL calls.

The relevant part of the render function in the QuickFrameBuffrObject::Renderer looks like this:

void Drawer::render()


    int width = 1.0f;

    int height = 1.0f;



    glColor4f(0.0, 0.0, 1.0, 0.8);

    // Drawing background


    glVertex2f(-1.0f, -1.0f);

    glVertex2f(width, -1.0f);

    glVertex2f(width, height);

    glVertex2f(-1.0f, height);


    if( m_window != nullptr )


//    update();


The problem is, that after resizing the window or conducting any other changes to the scene, the scene does not update. In case of resizing the screen it got cleared and does not draw anything new. When debugging I can observe, that the render function as well as the createFrameBuffer methods are called and work correctly.

When searching the web, there are the following potential error sources:

-          Shader program is overwritten

-          Wrong OpenGl context is used

-          OpenGL state is not reset

Do you have any experiences with this and can you see, where the error in my example might be?

Thanks a lot!

Best regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150916/0665a663/attachment.html>

More information about the Interest mailing list