update glinfo.py to use QOpenGLWidget
This commit is contained in:
parent
9145d7f24d
commit
4f619bbb4c
|
@ -1,16 +1,12 @@
|
|||
from ..Qt import QtCore, QtGui, QtOpenGL
|
||||
from ..Qt import QtWidgets
|
||||
from OpenGL.GL import *
|
||||
app = QtGui.QApplication([])
|
||||
|
||||
class GLTest(QtOpenGL.QGLWidget):
|
||||
def __init__(self):
|
||||
QtOpenGL.QGLWidget.__init__(self)
|
||||
self.makeCurrent()
|
||||
class GLTest(QtWidgets.QOpenGLWidget):
|
||||
def initializeGL(self):
|
||||
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()
|
||||
|
||||
|
||||
app = QtWidgets.QApplication([])
|
||||
GLTest().show()
|
||||
|
|
Loading…
Reference in New Issue