diff options
Diffstat (limited to 'src/mesa/es/main/es_generator.py')
-rw-r--r-- | src/mesa/es/main/es_generator.py | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/mesa/es/main/es_generator.py b/src/mesa/es/main/es_generator.py index 2e38b59d9e..5ad9c9b1d8 100644 --- a/src/mesa/es/main/es_generator.py +++ b/src/mesa/es/main/es_generator.py @@ -23,7 +23,7 @@ import sys, os -import apiutil +import APIspecutil as apiutil # These dictionary entries are used for automatic conversion. # The string will be used as a format string with the conversion @@ -142,19 +142,16 @@ def GetFormatString(type): # Version-specific values to be used in the main script # header: which header file to include # api: what text specifies an API-level function -# special: the name of the "specials" file VersionSpecificValues = { 'GLES1.1' : { 'description' : 'GLES1.1 functions', 'header' : 'GLES/gl.h', 'extheader' : 'GLES/glext.h', - 'special' : 'es1_special', }, 'GLES2.0': { 'description' : 'GLES2.0 functions', 'header' : 'GLES2/gl2.h', 'extheader' : 'GLES2/gl2ext.h', - 'special' : 'es2_special', } } @@ -166,13 +163,9 @@ VersionSpecificValues = { # error messages. program = os.path.basename(sys.argv[0]) -# We assume that the directory that the Python script is in also -# houses the "special" files. -programDir = os.path.dirname(sys.argv[0]) - # Set default values verbose = 0 -functionList = "APIspec.txt" +functionList = "APIspec.xml" version = "GLES1.1" # Allow for command-line switches @@ -215,17 +208,6 @@ if not VersionSpecificValues.has_key(version): # Grab the version-specific items we need to use versionHeader = VersionSpecificValues[version]['header'] versionExtHeader = VersionSpecificValues[version]['extheader'] -versionSpecial = VersionSpecificValues[version]['special'] - -# We're probably being invoked from a different directory, -# so look for the "special" file in the same directory that -# holds the Python script -specialFile = os.path.join(programDir, versionSpecial) -if not os.path.isfile(specialFile): - sys.stderr.write("%s: can't find special file '%s' for version '%s' - aborting" % (program, specialFile, version)) - sys.exit(1) - -allSpecials = apiutil.AllSpecials(specialFile.split("_")[0]) # If we get to here, we're good to go. The "version" parameter # directs GetDispatchedFunctions to only allow functions from @@ -235,6 +217,8 @@ allSpecials = apiutil.AllSpecials(specialFile.split("_")[0]) # GLES1 and GLES2). keys = apiutil.GetAllFunctions(functionList, version) +allSpecials = apiutil.AllSpecials() + print """/* DO NOT EDIT ************************************************* * THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT * API specification file: %s |