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

QOpenGLFunctions : glGetIntegerv GL_VIEWPORT Return Values

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Not Evaluated
    • Resolution: Out of scope
    • 5.9.2
    • None
    • GUI: OpenGL
    • None

    Description

      Trying to use void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint *params)

      with ( GL_VIEWPORT) to get the opengl viewport size return the whole window size (in my project the rendering window is part of other windows so its always smaller) and not the opengl window dimensions only.

      Exact code :

      int picking_viewport[4];
      glGetIntegerv( GL_VIEWPORT, picking_viewport );//this returns wrong (for me at least)
      int myUnproject_Width = QWidget::width();
      int myUnproject_Height = QWidget::height();
      

      myUnproject_Width is not picking_viewport[3]

      myUnproject_Height is not picking_viewport[4]

       
      Dont know if this is the expected Qt Behaviour , but i guess since width()/height() functions return correct values so should the glGetIntegerv which is specific to the Opengl environment and most would use it for other calculations.

      Attachments

        1. qtbug64635.zip
          6 kB
        2. Friedemann.rar
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            atlas2 atlas atlas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes