summaryrefslogtreecommitdiff
path: root/src/mesa/glapi
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-10-04 18:58:10 +0000
committerIan Romanick <idr@us.ibm.com>2006-10-04 18:58:10 +0000
commit553b8334bbe6b0af9496722f05cb8fc2e4d43a01 (patch)
tree73966a3c8ef9754c32047781f51f8e0eef5e196d /src/mesa/glapi
parent25e441e8e92688e596e4976b32818141d9fa3aab (diff)
Add utility method client_supported_for_indirect.
The new method client_supported_for_indirect is used to determine whether or not the client-side library supports the function for indirect rendering. The may or may not have associated protocol that needs to be generated (e.g., glVertexPointer does not, but glVertex3fv does).
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r--src/mesa/glapi/glX_XML.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py
index 7cc9d8d664..e3d4c666cf 100644
--- a/src/mesa/glapi/glX_XML.py
+++ b/src/mesa/glapi/glX_XML.py
@@ -505,6 +505,13 @@ class glx_function(gl_XML.gl_function):
return None
+ def client_supported_for_indirect(self):
+ """Returns true if the function is supported on the client
+ side for indirect rendering."""
+
+ return not self.ignore and (self.offset != -1) and (self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.client_handcode)
+
+
class glx_function_iterator:
"""Class to iterate over a list of glXFunctions"""
@@ -519,10 +526,10 @@ class glx_function_iterator:
def next(self):
f = self.iterator.next()
- if f.ignore or not (f.glx_rop or f.glx_sop or f.glx_vendorpriv or f.vectorequiv or f.client_handcode):
- return self.next()
- else:
+ if f.client_supported_for_indirect():
return f
+ else:
+ return self.next()
class glx_api(gl_XML.gl_api):