VirtualBox

Ignore:
Timestamp:
Oct 16, 2012 9:40:24 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
81409
Message:

crOpenGL: allow adding new commands w/o breaking backwards compatibility (i.e. w/o changing current opcode values)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py

    r43647 r43652  
    4747                self.props = []
    4848                self.chromium = []
     49                self.chrelopcode = -1
    4950
    5051
     
    162163                                                break
    163164
     165                        elif tokens[0] == 'chrelopcode':
     166                                record.chrelopcode = int(tokens[1])
     167
    164168                        else:
    165169                                print 'Invalid token %s after function %s' % (tokens[0], record.name)
     
    312316        d = GetFunctionDict()
    313317        return d[funcName].chromium
     318       
     319def ChromiumRelOpCode(funcName):
     320        """Return list of Chromium-specific properties of the named GL function."""
     321        d = GetFunctionDict()
     322        return d[funcName].chrelopcode
     323       
    314324
    315325def ParamProps(funcName):
     
    368378                return ''
    369379        elif (cat == '1.3' or
    370           cat == '1.4' or
    371           cat == '1.5' or
    372           cat == '2.0' or
    373           cat == '2.1'):
     380                  cat == '1.4' or
     381                  cat == '1.5' or
     382                  cat == '2.0' or
     383                  cat == '2.1'):
    374384                # i.e. OpenGL 1.3 or 1.4 or 1.5
    375385                return "OPENGL_VERSION_" + string.replace(cat, ".", "_")
     
    580590
    581591def MakeDeclarationStringWithContext(ctx_macro_prefix, params):
    582     """Same as MakeDeclarationString, but adds a context macro
    583     """
    584    
    585     n = len(params)
    586     if n == 0:
    587         return ctx_macro_prefix + '_ARGSINGLEDECL'
    588     else:
    589         result = MakeDeclarationString(params)
    590         return ctx_macro_prefix + '_ARGDECL ' + result
    591     #endif
     592        """Same as MakeDeclarationString, but adds a context macro
     593        """
     594       
     595        n = len(params)
     596        if n == 0:
     597                return ctx_macro_prefix + '_ARGSINGLEDECL'
     598        else:
     599                result = MakeDeclarationString(params)
     600                return ctx_macro_prefix + '_ARGDECL ' + result
     601        #endif
    592602#enddef
    593603
     
    639649        'GLhandleARB': 4,
    640650        'GLcharARB': 1,
    641     'uintptr_t': 4
     651        'uintptr_t': 4
    642652}
    643653
Note: See TracChangeset for help on using the changeset viewer.

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