Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOpenGLFramebufferObject not working since 5.4
Forum Updated to NodeBB v4.3 + New Features

QOpenGLFramebufferObject not working since 5.4

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 705 Views 1 Watching
  • 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 Offline
    G Offline
    glararan
    wrote on last edited by
    #1

    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
    0
    • G Offline
      G Offline
      glararan
      wrote on last edited by
      #2

      Thread bump

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved