[Interest] QuickFrameBufferObject does not redraw

Wehmer, Matthias Matthias.Wehmer at draeger.com
Wed Sep 16 08:34:55 CEST 2015


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;

    glEnable(GL_BLEND);

    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    glColor4f(0.0, 0.0, 1.0, 0.8);

 

    // Drawing background

    glBegin(GL_QUADS);

    glVertex2f(-1.0f, -1.0f);

    glVertex2f(width, -1.0f);

    glVertex2f(width, height);

    glVertex2f(-1.0f, height);

    glEnd();

 

    if( m_window != nullptr )

        m_window->resetOpenGLState();

 

//    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

Matthias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150916/be9b6d45/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5658 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150916/be9b6d45/attachment.bin>


More information about the Interest mailing list