def dump_glu(): '''Dump GLU info.''' from pyglet.gl import glu_info print 'glu_info.get_version():', glu_info.get_version() print 'glu_info.get_extensions():' extensions = list(glu_info.get_extensions()) extensions.sort() for name in extensions: print ' ', name
def dump_glu(): """Dump GLU info.""" from pyglet.gl import glu_info print('glu_info.get_version():', glu_info.get_version()) print('glu_info.get_extensions():') extensions = list(glu_info.get_extensions()) extensions.sort() for name in extensions: print(' ', name)
def dump_glu(): '''Dump GLU info.''' from pyglet.gl import glu_info _print('glu_info.get_version():', glu_info.get_version()) _print('glu_info.get_extensions():') extensions = list(glu_info.get_extensions()) extensions.sort() for name in extensions: _print(' ', name)
print 'Creating default context...' w = pyglet.window.Window(1, 1, visible=True) print 'GL attributes:' attrs = w.config.get_gl_attributes() attrs = ' '.join(['%s=%s'%(name, value) for name, value in attrs]) print '\n'.join(textwrap.wrap(attrs)) print 'GL version:', gl_info.get_version() print 'GL vendor:', gl_info.get_vendor() print 'GL renderer:', gl_info.get_renderer() print 'GL extensions:' exts = ' '.join(gl_info.get_extensions()) print ' ', '\n '.join(textwrap.wrap(exts)) print 'GLU version:', glu_info.get_version() print 'GLU extensions:' exts = ' '.join(glu_info.get_extensions()) print ' ', '\n '.join(textwrap.wrap(exts)) print context = w.context print 'Context is', context 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 'Creating default context...' w = pyglet.window.Window(1, 1, visible=True) print 'GL attributes:' attrs = w.config.get_gl_attributes() attrs = ' '.join(['%s=%s' % (name, value) for name, value in attrs]) print '\n'.join(textwrap.wrap(attrs)) print 'GL version:', gl_info.get_version() print 'GL vendor:', gl_info.get_vendor() print 'GL renderer:', gl_info.get_renderer() print 'GL extensions:' exts = ' '.join(gl_info.get_extensions()) print ' ', '\n '.join(textwrap.wrap(exts)) print 'GLU version:', glu_info.get_version() print 'GLU extensions:' exts = ' '.join(glu_info.get_extensions()) print ' ', '\n '.join(textwrap.wrap(exts)) print context = w.context print 'Context is', context 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: