Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.9.2
-
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.