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.
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py
index 1db12f5..56a2113 100644
--- a/src/mesa/glapi/glX_XML.py
+++ b/src/mesa/glapi/glX_XML.py
@@ -81,8 +81,9 @@
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 @@
[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 @@
else:
gl_XML.FilterGLAPISpecBase.endElement(self, name)
return
+
+
+ def createEnumFunction(self, n):
+ return glXEnumFunction(n, self)