import argparse
import collections
-import imp
+import eglFunctionList
import sys
import textwrap
+import os
+NEWAPI = os.path.join(os.path.dirname(__file__), "..", "..", "mapi", "new")
+sys.path.insert(0, NEWAPI)
import genCommon
def main():
parser = argparse.ArgumentParser()
parser.add_argument("target", choices=("header", "source"),
help="Whether to build the source or header file.")
- parser.add_argument("func_list_file", help="The function list .py file.")
parser.add_argument("xml_files", nargs="+", help="The XML files with the EGL function lists.")
args = parser.parse_args()
- # The function list is a Python module, but it's specified on the command
- # line.
- eglFunctionList = imp.load_source("eglFunctionList", args.func_list_file)
-
xmlFunctions = genCommon.getFunctions(args.xml_files)
xmlByName = dict((f.name, f) for f in xmlFunctions)
functions = []
#include <EGL/egl.h>
#include <EGL/eglext.h>
+ #include <EGL/eglmesaext.h>
+ #include <EGL/eglextchromium.h>
#include "glvnd/libeglabi.h"
""".lstrip("\n"))
text = ""
text += '#include "egldispatchstubs.h"\n'
text += '#include "g_egldispatchstubs.h"\n'
+ text += '#include <stddef.h>\n'
text += "\n"
for (func, eglFunc) in functions: