aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen/gl_table.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/gl_table.py')
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_table.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py
index 210e75925..0361d6590 100644
--- a/mesalib/src/mapi/glapi/gen/gl_table.py
+++ b/mesalib/src/mapi/glapi/gen/gl_table.py
@@ -214,28 +214,28 @@ class PrintRemapTable(gl_XML.gl_print_base):
def show_usage():
- print "Usage: %s [-f input_file_name] [-m mode] [-c]" % sys.argv[0]
+ print "Usage: %s [-f input_file_name] [-m mode] [-c ver]" % sys.argv[0]
print " -m mode Mode can be 'table' or 'remap_table'."
- print " -c Enable compatibility with OpenGL ES."
+ print " -c ver Version can be 'es1' or 'es2'."
sys.exit(1)
if __name__ == '__main__':
file_name = "gl_API.xml"
try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c")
+ (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c:")
except Exception,e:
show_usage()
mode = "table"
- es = False
+ es = None
for (arg,val) in args:
if arg == "-f":
file_name = val
elif arg == "-m":
mode = val
elif arg == "-c":
- es = True
+ es = val
if mode == "table":
printer = PrintGlTable(es)
@@ -246,4 +246,14 @@ if __name__ == '__main__':
api = gl_XML.parse_GL_API( file_name )
+ if es is not None:
+ import gles_api
+
+ api_map = {
+ 'es1': gles_api.es1_api,
+ 'es2': gles_api.es2_api,
+ }
+
+ api.filter_functions(api_map[es])
+
printer.Print( api )