VirtualBox

Changeset 43647 in vbox


Ignore:
Timestamp:
Oct 15, 2012 5:42:34 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: generate omitted aliaces for GetProcAddress

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/windows_getprocaddress.py

    r40267 r43647  
    3838
    3939
    40 keys = apiutil.GetAllFunctions(sys.argv[1]+"/APIspec.txt")
     40keys = apiutil.GetAllFunctionsAndOmittedAliases(sys.argv[1]+"/APIspec.txt")
    4141for func_name in keys:
    4242    if "Chromium" == apiutil.Category(func_name):
     
    4949        pass #continue
    5050
     51    # alias is the function we're aliasing
     52    proc_name = func_name
     53    if "omit" in apiutil.ChromiumProps(func_name):
     54        alias = apiutil.Alias(func_name)
     55        if alias:
     56            proc_name = alias
     57
    5158    wrap = apiutil.GetCategoryWrapper(func_name)
    5259    name = "gl" + func_name
    53     address = "cr_gl" + func_name
     60    address = "cr_gl" + proc_name
    5461    if wrap:
    5562        print '#ifdef CR_%s' % wrap
     
    137144    if (!crStrcmp( name, "wglSwapIntervalEXT" )) return (CR_PROC) wglSwapIntervalEXT;
    138145   
    139     /* this is needed for VSG Open Inventor stuff.
    140      * @todo: make all these auto-generated!!! */
    141     if (!crStrcmp( name, "glBeginQuery" )) return (CR_PROC) cr_glBeginQueryARB;
    142     if (!crStrcmp( name, "glDeleteQueries" )) return (CR_PROC) cr_glDeleteQueriesARB;
    143     if (!crStrcmp( name, "glEndQuery" )) return (CR_PROC) cr_glEndQueryARB;
    144     if (!crStrcmp( name, "glGenQueries" )) return (CR_PROC) cr_glGenQueriesARB;
    145     if (!crStrcmp( name, "glGetQueryObjectiv" )) return (CR_PROC) cr_glGetQueryObjectivARB;
    146     if (!crStrcmp( name, "glGetQueryObjectuiv" )) return (CR_PROC) cr_glGetQueryObjectuivARB;
    147     if (!crStrcmp( name, "glGetQueryiv" )) return (CR_PROC) cr_glGetQueryivARB;
    148     if (!crStrcmp( name, "glIsQuery" )) return (CR_PROC) cr_glIsQueryARB;
    149 
    150146    crWarning("Returning GetProcAddress:NULL for %s", name);
    151147    return NULL;
  • trunk/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py

    r42028 r43647  
    224224        return funcs
    225225       
     226def GetAllFunctionsAndOmittedAliases(specFile = ""):
     227        """Return sorted list of all functions known to Chromium."""
     228        d = GetFunctionDict(specFile)
     229        funcs = []
     230        for func in d.keys():
     231                rec = d[func]
     232                if (not "omit" in rec.chromium or
     233                        rec.alias != ''):
     234                        funcs.append(func)
     235        funcs.sort()
     236        return funcs
    226237
    227238def GetDispatchedFunctions(specFile = ""):
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette