예제 #1
0
파일: info.py 프로젝트: Benrflanders/Pytris
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
예제 #2
0
파일: info.py 프로젝트: Yakser/TelegramBot
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)
예제 #3
0
파일: info.py 프로젝트: cajlarsson/village
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)
예제 #4
0
파일: gl_info.py 프로젝트: JetDoughnut/yeet
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))))
elif "win32" in globals() and isinstance(context, win32.Win32Context):
    from pyglet.gl import wgl_info
    if wgl_info.have_extension('WGL_EXT_extensions_string'):
예제 #5
0
파일: gl_info.py 프로젝트: izacus/pyglet
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)))
elif context.__class__.__name__ == 'Win32Context':
    from pyglet.gl import wgl_info
    if wgl_info.have_extension('WGL_EXT_extensions_string'):