if "xlib" in globals() and isinstance(context, xlib.BaseXlibContext): from pyglet.gl import glx_info print('GLX %s direct' % (context.is_direct() and 'is' or 'is not')) if not glx_info.have_version(1, 1): print("GLX server version: 1.0") else: print('GLX server vendor:', glx_info.get_server_vendor()) print('GLX server version:', glx_info.get_server_version()) print('GLX server extensions:') exts = glx_info.get_server_extensions() print(' ', '\n '.join(textwrap.wrap(' '.join(exts)))) print('GLX client vendor:', glx_info.get_client_vendor()) print('GLX client version:', glx_info.get_client_version()) print('GLX client extensions:') exts = glx_info.get_client_extensions() print(' ', '\n '.join(textwrap.wrap(' '.join(exts)))) print('GLX extensions:') exts = glx_info.get_extensions() print(' ', '\n '.join(textwrap.wrap(' '.join(exts)))) elif "win32" in globals() and isinstance(context, win32.Win32Context): from pyglet.gl import wgl_info if wgl_info.have_extension('WGL_EXT_extensions_string'): wgl_extensions = wgl_info.get_extensions() print('WGL extensions:') print('', '\n '.join(textwrap.wrap(' '.join(wgl_extensions)))) else: print('WGL_EXT_extensions_string extension not available.') w.close()
if context.__class__.__name__ == 'XlibGLContext': from pyglet.gl import glx_info print 'GLX %s direct'%(context.is_direct() and 'is' or 'is not') if not glx_info.have_version(1, 1): print "GLX server version: 1.0" else: print 'GLX server vendor:', glx_info.get_server_vendor() print 'GLX server version:', glx_info.get_server_version() print 'GLX server extensions:' exts = glx_info.get_server_extensions() print ' ', '\n '.join(textwrap.wrap(' '.join(exts))) print 'GLX client vendor:', glx_info.get_client_vendor() print 'GLX client version:', glx_info.get_client_version() print 'GLX client extensions:' exts = glx_info.get_client_extensions() print ' ', '\n '.join(textwrap.wrap(' '.join(exts))) print 'GLX extensions:' exts = glx_info.get_extensions() print ' ', '\n '.join(textwrap.wrap(' '.join(exts))) elif context.__class__.__name__ == 'Win32Context': from pyglet.gl import wgl_info if wgl_info.have_extension('WGL_EXT_extensions_string'): wgl_extensions = wgl_info.get_extensions() print 'WGL extensions:' print '', '\n '.join(textwrap.wrap(' '.join(wgl_extensions))) else: print 'WGL_EXT_extensions_string extension not available.' w.close()