diff options
author | Ian Romanick <[email protected]> | 2005-01-27 01:08:48 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2005-01-27 01:08:48 +0000 |
commit | 5aa6dc329b983b95071700c3af9353e3b35454d9 (patch) | |
tree | 89506c88a9668aca519aa79d1654a1144d724f71 /src/mesa/glapi/glX_XML.py | |
parent | 5b0dd893704157cb8f9c42ce4a32a9d3e2a7edef (diff) |
The 'mode' setting of a function within an 'enum' element is now used.
Parameters to glX_proto_size.py are now used to determine whether to emit
either get-type function, set-type functions, or both. When only get-type
functions are emitted, they can optionally alias set-type functions. This
would be useful if, for example, the two types were in different source
files.
The real work to implement this is in SizeStubFunctionIterator class. All
of the logic for which functions to iterate and in which order is
implemented there.
Diffstat (limited to 'src/mesa/glapi/glX_XML.py')
-rw-r--r-- | src/mesa/glapi/glX_XML.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py index 9d8fe000961..dcfb0156230 100644 --- a/src/mesa/glapi/glX_XML.py +++ b/src/mesa/glapi/glX_XML.py @@ -83,7 +83,9 @@ class glXItemFactory(gl_XML.glItemFactory): class glXEnumFunction: def __init__(self, name): self.name = name - + self.mode = 0 + self.sig = None + # "enums" is a set of lists. The element in the set is the # value of the enum. The list is the list of names for that # value. For example, [0x8126] = {"POINT_SIZE_MIN", @@ -115,12 +117,23 @@ class glXEnumFunction: def signature( self ): - sig = "" - for i in self.count: - for e in self.count[i]: - sig += "%04x,%u," % (e, i) + if self.sig == None: + self.sig = "" + for i in self.count: + for e in self.count[i]: + self.sig += "%04x,%u," % (e, i) - return sig; + return self.sig + + + def set_mode( self, mode ): + """Mark an enum-function as a 'set' function.""" + + self.mode = mode + + + def is_set( self ): + return self.mode def PrintUsingTable(self): @@ -248,6 +261,7 @@ class glXEnum(gl_XML.glEnum): if not self.context.glx_enum_functions.has_key( n ): f = glXEnumFunction( n ) + f.set_mode( mode ) self.context.glx_enum_functions[ f.name ] = f self.context.glx_enum_functions[ n ].append( c, self.value, self.name ) |