QOpenGLFramebufferObject not working since 5.4



  • Hi,

    All my FBOs stops working on Qt 5.4, I did migration from QGLWidget to QOpenGLWidget

    I did this code with fbo and QOpenGLWidget went blue.
    @for(int tx = 0; tx < TILES; ++tx)
    {
    for(int ty = 0; ty < TILES; ++ty)
    {
    if(tileLoaded(tx, ty))
    {
    qDebug() << fbo->bind(); // true

                GLfuncs->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
                GLfuncs->glViewport(0, 0, fbo->width(), fbo->height());
    
                tile[x][y]->draw(...);
    
                qDebug() << fbo->release(); // true
    
                GLfuncs->glViewport(0, 0, viewportSize.width(), viewportSize.height());
            }
        }
    }
    
    QImage img = fbo->toImage();
    
    qDebug() << img.width() << img.height(); // 8K
    
    img.save("test2.png");@
    

    Everything worked on 5.3. There is something new thing I missing to do, but what?

    Thanks,

    Regards, glararan.



  • Thread bump


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.