add comment about definition of viewport

This commit is contained in:
KIU Shueng Chuan 2021-07-17 10:40:27 +08:00
parent 1b00d3448a
commit b5fc3d2a7e

View File

@ -230,6 +230,8 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
if viewport is None:
glViewport(*self.getViewport())
else:
# note: the following code means that we have defined "viewport"
# to be in device pixels.
glViewport(*viewport)
self.setProjection(region=region)
self.setModelview()