Ejemplo 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
Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 4
0
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()

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))))
Ejemplo n.º 5
0
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 '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)))