Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6712

QGLFramebufferObject does not reset OpenGL Viewport

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 4.6.1
    • 4.6.0
    • GUI: OpenGL
    • None
    • Windows Vista, Geforce Quadro FX 570m, 4 GB RAM
    • cc5ae2db39bd5cb5e7710b1b7ce1b5c92b705450

    Description

      When a Framebuffer Object is used for rendering a Qt-Widget into a texture during OpenGL Scene rendering, the openGL Viewport remains set to the size of the framebuffer object.

      I am using the FBO like this.
      1. Initialization :
      fbo = new QGLFramebufferObject(renderWidget->size(),QGLFramebufferObject::CombinedDepthStencil,GL_TEXTURE_2D);

      2. during OpenGL rendering
      // here viewport is (0,0,1280,800) = Canvas size
      widgetToRender->render(fbo); // widgetToRender is a QWidget*
      // here viewport is (0,0,1024,768) = size of widgetToRender

      by reading and setting the vieport after widget rendering the problem can be resolved, but i would expect the opengl state to be the same before as after rendering using a frambuffer (this was the case prior to Qt 4.6.)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rweather Rhys Weatherley (closed Nokia identity) (Inactive)
            myp Jan Klimke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes