aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-08-03 15:23:16 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-08-05 10:39:45 +0200
commit9fb437cd2d017648f4bfc522b47f9488b825909e (patch)
tree77629d808239b5a94f87ff00c570120bb7cc01ed /sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
parent7bd5883267bfb69527d8eeb303eda50fdd13ac9d (diff)
Add glGet(Boolean|Float|Integer)v() to QtGui's QOpenGLFunctions
The function return varying numbers of return values in an array. Add a helper function to determine the number. Depending on it, a single value or a numpy array is returned, matching the behavior of PyOpenGL. Task-number: PYSIDE-2013 Task-number: PYSIDE-2017 Change-Id: I8a91e491939e668932ea03eda64d83ed08ab28b3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py')
-rw-r--r--sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py b/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
index a1e2a40d7..3a5cd0bbe 100644
--- a/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
+++ b/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
@@ -43,6 +43,7 @@ class OpenGLWindow(QOpenGLWindow):
def initializeGL(self):
self.m_functions = self.context().functions()
self.m_functions.initializeOpenGLFunctions()
+ print("GL_MAX_LIGHTS=", self.m_functions.glGetIntegerv(GL.GL_MAX_LIGHTS))
image = QImage(QSize(200, 200), QImage.Format_RGBA8888)
image.fill(QColor(Qt.red))
self.m_texture = QOpenGLTexture(image)