Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QOpenGLFramebufferObject not working since 5.4

    General and Desktop
    1
    2
    624
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      glararan last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • G
        glararan last edited by

        Thread bump

        1 Reply Last reply Reply Quote 0
        • First post
          Last post