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

QOpenGLFunctions : glGetIntegerv GL_VIEWPORT Return Values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 5.9.2
    • Fix Version/s: None
    • Component/s: GUI: OpenGL
    • Labels:
      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. Friedemann.rar
          6 kB
        2. qtbug64635.zip
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sletta Gunnar Sletta
            Reporter:
            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