Esempio n. 1
0
def generate_for_file(filename):
    log.info('Starting file: %s', filename)
    registry = xmlreg.parse(filename)
    generator = codegenerator.Generator(registry,
                                        ctypetopytype.ctype_to_pytype)
    for name, feature in registry.feature_set.items():
        print(feature.name, feature.api)
        generator.module(feature)
    for name, extension in registry.extension_set.items():
        print(extension.name, extension.apis)
        generator.module(extension)
Esempio n. 2
0
def generate_for_file( filename ):
    log.info( 'Starting file: %s', filename )
    registry = xmlreg.parse( filename )
    generator = codegenerator.Generator(
        registry,
        ctypetopytype.ctype_to_pytype
    )
    for name,feature in registry.feature_set.items():
        print(feature.name, feature.api)
        generator.module( feature )
    for name,extension in registry.extension_set.items():
        print(extension.name, extension.apis)
        generator.module( extension )
Esempio n. 3
0
def main():
    chromium = load_chromium()
    registry = xmlreg.parse(os.path.join(HERE, "khronosapi", "gl.xml"))
    generator = codegenerator.Generator(registry, ctypetopytype.ctype_to_pytype)
    for key, value in generator.glGetSizes.items():
        if not value:
            if key in chromium:
                print(f"Updating {key} should be {chromium[key]}")
                generator.glGetSizes[key] = [str(chromium[key]).replace(" ", "")]
        try:
            chromium.pop(key)
        except KeyError:
            pass
    for key, value in chromium.items():
        print("New constant from chromium:", (key, value))
        generator.glGetSizes[key] = [str(chromium[key]).replace(" ", "")]
    generator.saveGLGetSizes()
Esempio n. 4
0
def main():
    chromium = load_chromium()
    registry = xmlreg.parse(os.path.join(HERE, 'khronosapi', 'gl.xml'))
    generator = codegenerator.Generator(registry,
                                        ctypetopytype.ctype_to_pytype)
    for key, value in generator.glGetSizes.items():
        if not value:
            if key in chromium:
                print('Updating %s should be %s' % (key, chromium[key]))
                generator.glGetSizes[key] = [
                    str(chromium[key]).replace(' ', '')
                ]
        try:
            chromium.pop(key)
        except KeyError:
            pass
    for key, value in chromium.items():
        print('New constant from chromium:', (key, value))
        generator.glGetSizes[key] = [str(chromium[key]).replace(' ', '')]
    generator.saveGLGetSizes()
Esempio n. 5
0
def main():
    chromium = load_chromium()
    registry = xmlreg.parse( os.path.join( HERE,'khronosapi','gl.xml') )
    generator = codegenerator.Generator(
        registry,
        ctypetopytype.ctype_to_pytype
    )
    for key,value in generator.glGetSizes.items():
        if not value:
            if key in chromium:
                print('Updating %s should be %s'%( key, chromium[key] ))
                generator.glGetSizes[key] = [str(chromium[key]).replace(' ','')]
        try:
            chromium.pop(key)
        except KeyError:
            pass 
    for key,value in chromium.items():
        print('New constant from chromium:', (key,value))
        generator.glGetSizes[key] = [str(chromium[key]).replace(' ','')]
    generator.saveGLGetSizes()