Always log info about obtained GL context
The more info, the better.
This commit is contained in:
parent
b10de6f592
commit
8812e4140a
@ -36,6 +36,21 @@ def validateQGLContext(context):
|
||||
|
||||
actualFormat = context.format()
|
||||
""":type : QtOpenGL.QGLFormat"""
|
||||
|
||||
detailedText = "Obtained a GL context with this format:\n"
|
||||
detailedText += "Valid: %s\n" % (context.isValid(),)
|
||||
detailedText += "Version: %s.%s\n" % (actualFormat.majorVersion(), actualFormat.minorVersion())
|
||||
detailedText += "Hardware Accelerated: %s\n" % (actualFormat.directRendering(), )
|
||||
detailedText += "Depth buffer: %s, %s\n" % (actualFormat.depth(), actualFormat.depthBufferSize())
|
||||
detailedText += "Double buffer: %s\n" % (actualFormat.doubleBuffer(), )
|
||||
detailedText += "\n"
|
||||
detailedText += "Driver info:\n"
|
||||
detailedText += "GL_VERSION: %s\n" % GL.glGetString(GL.GL_VERSION)
|
||||
detailedText += "GL_VENDOR: %s\n" % GL.glGetString(GL.GL_VENDOR)
|
||||
detailedText += "GL_RENDERER: %s\n" % GL.glGetString(GL.GL_RENDERER)
|
||||
|
||||
log.info("%s", detailedText)
|
||||
|
||||
if (not context.isValid() or not actualFormat.directRendering()
|
||||
or not versionFlags & QtOpenGL.QGLFormat.OpenGL_Version_1_3
|
||||
or (actualFormat.majorVersion(), actualFormat.minorVersion()) < (1, 3)):
|
||||
@ -48,18 +63,6 @@ def validateQGLContext(context):
|
||||
"graphics drivers are installed correctly.")
|
||||
)
|
||||
|
||||
detailedText = "Obtained a GL context with this format:\n"
|
||||
detailedText += "Valid: %s\n" % (context.isValid(),)
|
||||
detailedText += "Version: %s.%s\n" % (actualFormat.majorVersion(), actualFormat.minorVersion())
|
||||
detailedText += "Hardware Accelerated: %s\n" % (actualFormat.directRendering(), )
|
||||
detailedText += "Depth buffer: %s, %s\n" % (actualFormat.depth(), actualFormat.depthBufferSize())
|
||||
detailedText += "Double buffer: %s\n" % (actualFormat.doubleBuffer(), )
|
||||
detailedText += "\n"
|
||||
detailedText += "Driver info:\n"
|
||||
detailedText += "GL_VERSION: %s\n" % GL.glGetString(GL.GL_VERSION)
|
||||
detailedText += "GL_VENDOR: %s\n" % GL.glGetString(GL.GL_VENDOR)
|
||||
detailedText += "GL_RENDERER: %s\n" % GL.glGetString(GL.GL_RENDERER)
|
||||
|
||||
msgBox.setDetailedText(detailedText)
|
||||
|
||||
msgBox.setIcon(QtGui.QMessageBox.Critical)
|
||||
|
Reference in New Issue
Block a user