Exemplo n.º 1
0
def dump_glx():
    '''Dump GLX info.'''
    try:
        from pyglet.gl import glx_info
    except:
        print 'GLX not available.'
        return
    import pyglet
    window = pyglet.window.Window(visible=False)
    print 'context.is_direct():', window.context.is_direct()
    window.close()

    if not glx_info.have_version(1, 1):
        print 'Version: < 1.1'
    else:
        print 'glx_info.get_server_vendor():', glx_info.get_server_vendor()
        print 'glx_info.get_server_version():', glx_info.get_server_version()
        print 'glx_info.get_server_extensions():'
        for name in glx_info.get_server_extensions():
            print '  ', name
        print 'glx_info.get_client_vendor():', glx_info.get_client_vendor()
        print 'glx_info.get_client_version():', glx_info.get_client_version()
        print 'glx_info.get_client_extensions():'
        for name in glx_info.get_client_extensions():
            print '  ', name
        print 'glx_info.get_extensions():'
        for name in glx_info.get_extensions():
            print '  ', name
Exemplo n.º 2
0
def dump_glx():
    """Dump GLX info."""
    try:
        from pyglet.gl import glx_info
    except:
        print('GLX not available.')
        return
    import pyglet
    window = pyglet.window.Window(visible=False)
    print('context.is_direct():', window.context.is_direct())
    window.close()

    if not glx_info.have_version(1, 1):
        print('Version: < 1.1')
    else:
        print('glx_info.get_server_vendor():', glx_info.get_server_vendor())
        print('glx_info.get_server_version():', glx_info.get_server_version())
        print('glx_info.get_server_extensions():')
        for name in glx_info.get_server_extensions():
            print('  ', name)
        print('glx_info.get_client_vendor():', glx_info.get_client_vendor())
        print('glx_info.get_client_version():', glx_info.get_client_version())
        print('glx_info.get_client_extensions():')
        for name in glx_info.get_client_extensions():
            print('  ', name)
        print('glx_info.get_extensions():')
        for name in glx_info.get_extensions():
            print('  ', name)
Exemplo n.º 3
0
def dump_glx():
    """Dump GLX info."""
    try:
        from pyglet.gl import glx_info
    except:
        print("GLX not available.")
        return
    import pyglet

    window = pyglet.window.Window(visible=False)
    print("context.is_direct():", window.context.is_direct())
    window.close()

    if not glx_info.have_version(1, 1):
        print("Version: < 1.1")
    else:
        print("glx_info.get_server_vendor():", glx_info.get_server_vendor())
        print("glx_info.get_server_version():", glx_info.get_server_version())
        print("glx_info.get_server_extensions():")
        for name in glx_info.get_server_extensions():
            print("  ", name)
        print("glx_info.get_client_vendor():", glx_info.get_client_vendor())
        print("glx_info.get_client_version():", glx_info.get_client_version())
        print("glx_info.get_client_extensions():")
        for name in glx_info.get_client_extensions():
            print("  ", name)
        print("glx_info.get_extensions():")
        for name in glx_info.get_extensions():
            print("  ", name)
Exemplo n.º 4
0
exts = ' '.join(gl_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:
        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()
Exemplo n.º 5
0
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 '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()