Max texture size is fetched using an offscreen context

This commit is contained in:
David Vierra 2016-02-01 02:36:15 -10:00
parent d3aa593a58
commit a7f123d2b4

View File

@ -331,6 +331,9 @@ def getGLMaximumTextureSize():
return _maxSize
def _getMaxSize():
if QtOpenGL.QGLContext.currentContext() is None:
pbuf = QtOpenGL.QGLPixelBuffer(100, 100)
pbuf.makeCurrent()
size = 16384
while size > 0:
size /= 2