Nominate our 2022 Qt Champions!

OpenGL rendering to framebufferobject

  • Hi,

    I'm trying to port some old renderer to be used in a small qml application. For that I'm using the TexturesInSGNode example (examples->quick->scenegraph->texturesinsgnode). I changed the logorenderer (under the shared folder) for that to just a very basic test. I removed everything from the initialize function (the renderer does not use shaders, just some simple glBegin-glEnd drawing) and the render function looks like this.

    void LogoRenderer::render()
    glClearColor(0.0f, 0.5f, 0.7f, 1.0f);

    glColor3f(1.0, 0.0, 0.0);
    glVertex2i(0, 0);

    When I render this, only the first frame is rendered correct (a red dot in the center of the qml component, but all frames after that are not rendered correct (nothing shown, just the clearcolor) (also it seems the Y-axis is flipped, but as I understand, this is normal).
    When I comment the update() function in the QQuickFramebufferObject::Renderer render() function (in this render function before the update() function, the above logorenderer::render() function is called), the red dot is rendered correct, but the logorender::render() function is called only once, when i uncomment that update function, the logorender::render() function is called every frame, but then only the clearcolor is shown without the red dot. I'm sure I'm missing something very stupid, but I don't know what...


  • Hmm missing the bind? Is a sample from "this": thread.

  • Don't think so. I don't really have access to the framebufferobject. According to the documentation, you should just implement the render function (and synchronize function if necessary). But according to "this": thread, I'm not the only one with that problem, so I've decided to switch to use shaders anyway.


  • Hey guys,

    I'm having the same problem here.
    Is there any solution?


Log in to reply