Ejemplo n.º 1
0
def dump_glx():
    '''Dump GLX info.'''
    try:
        from fos.lib.pyglet.gl import glx_info
    except:
        print 'GLX not available.'
        return
    import fos.lib.pyglet
    window = fos.lib.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
Archivo: info.py Proyecto: arokem/Fos
def dump_glx():
    '''Dump GLX info.'''
    try:
        from fos.lib.pyglet.gl import glx_info
    except:
        print 'GLX not available.'
        return
    import fos.lib.pyglet
    window = fos.lib.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_window():
    '''Dump display, window, screen and default config info.'''
    import fos.lib.pyglet.window
    platform = fos.lib.pyglet.window.get_platform()
    print 'platform:', repr(platform)
    display = platform.get_default_display()
    print 'display:', repr(display)
    screens = display.get_screens()
    for i, screen in enumerate(screens):
        print 'screens[%d]: %r' % (i, screen)
    window = fos.lib.pyglet.window.Window(visible=False)
    for key, value in window.config.get_gl_attributes():
        print "config['%s'] = %r" % (key, value)
    print 'context:', repr(window.context)

    _heading('window.context._info')
    dump_gl(window.context)
    window.close()
Ejemplo n.º 4
0
Archivo: info.py Proyecto: arokem/Fos
def dump_window():
    '''Dump display, window, screen and default config info.'''
    import fos.lib.pyglet.window
    platform = fos.lib.pyglet.window.get_platform()
    print 'platform:', repr(platform)
    display = platform.get_default_display()
    print 'display:', repr(display)
    screens = display.get_screens()
    for i, screen in enumerate(screens):
        print 'screens[%d]: %r' % (i, screen)
    window = fos.lib.pyglet.window.Window(visible=False)
    for key, value in window.config.get_gl_attributes():
        print "config['%s'] = %r" % (key, value)
    print 'context:', repr(window.context)

    _heading('window.context._info')
    dump_gl(window.context)
    window.close()