summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/glX_XML.py
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-02-01 00:13:04 +0000
committerIan Romanick <[email protected]>2005-02-01 00:13:04 +0000
commitba09c19ed65051cd9244c8a5ff380d08e7db1aed (patch)
treede5eb21908dcc40c2ebf71c02658f1935cf02054 /src/mesa/glapi/glX_XML.py
parent886280763c8dfa7202bdacdeacf84ced69609b98 (diff)
Add GlxProto::createEnumFunction and add a 'context' parameter to the
glXEnumFunction constructor. The allows sub-classes of GlxProto to over-ride the concrete class used for glXEnumFunction. In addition to tracking p_count_parameters in glParameter, break the comma separated list of parameter names into a Python list called count_parameter_list. It is now possible to query if a name is the name of one of the count parameters just by comparing param.count_parameter_list.count(n) to zero. Eventually the remaining uses of p_count_parameters will be replaced with uses of count_parameter_list. Make sure that 'void *' parameters are handled correctly in glParameter::size_string. Add PrintGlxReqSize_h and PrintGlxReqSize_c. These classes emit prototypes and functions used on the server-side to determine the expected size of an incoming GL command.
Diffstat (limited to 'src/mesa/glapi/glX_XML.py')
-rw-r--r--src/mesa/glapi/glX_XML.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py
index 1db12f5c940..56a2113f050 100644
--- a/src/mesa/glapi/glX_XML.py
+++ b/src/mesa/glapi/glX_XML.py
@@ -81,8 +81,9 @@ class glXItemFactory(gl_XML.glItemFactory):
return gl_XML.glItemFactory.create(self, context, name, attrs)
class glXEnumFunction:
- def __init__(self, name):
+ def __init__(self, name, context):
self.name = name
+ self.context = context
self.mode = 0
self.sig = None
@@ -261,7 +262,7 @@ class glXEnum(gl_XML.glEnum):
[n, c, mode] = self.process_attributes(attrs)
if not self.context.glx_enum_functions.has_key( n ):
- f = glXEnumFunction( n )
+ f = self.context.createEnumFunction( n )
f.set_mode( mode )
self.context.glx_enum_functions[ f.name ] = f
@@ -692,3 +693,7 @@ class GlxProto(gl_XML.FilterGLAPISpecBase):
else:
gl_XML.FilterGLAPISpecBase.endElement(self, name)
return
+
+
+ def createEnumFunction(self, n):
+ return glXEnumFunction(n, self)