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)
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 )
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()
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()
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()