File: glInfo.py

package info (click to toggle)
python-pyqtgraph 0.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,684 kB
  • sloc: python: 45,678; makefile: 115; ansic: 40
file content (16 lines) | stat: -rw-r--r-- 555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from ..Qt import QtCore, QtGui, QtOpenGL
from OpenGL.GL import *
app = QtGui.QApplication([])

class GLTest(QtOpenGL.QGLWidget):
    def __init__(self):
        QtOpenGL.QGLWidget.__init__(self)
        self.makeCurrent()
        print("GL version:" + glGetString(GL_VERSION).decode("utf-8"))
        print("MAX_TEXTURE_SIZE: %d" % glGetIntegerv(GL_MAX_TEXTURE_SIZE))
        print("MAX_3D_TEXTURE_SIZE: %d" % glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE))
        print("Extensions: " + glGetString(GL_EXTENSIONS).decode("utf-8").replace(" ", "\n"))

GLTest()