summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/p_state.i
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-14 12:06:37 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-14 12:06:37 +0000
commitf1848977e8f55e6d8cf5169520fb9b0a6c817884 (patch)
treeffa94e662d16f285e006837029513afdc94c70b8 /src/gallium/state_trackers/python/p_state.i
parent04cc5055db9b418abfc6abb97b69c022abfdff2d (diff)
python: Tell swig how to index per-rendertarget blend state.
Diffstat (limited to 'src/gallium/state_trackers/python/p_state.i')
-rw-r--r--src/gallium/state_trackers/python/p_state.i14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/python/p_state.i b/src/gallium/state_trackers/python/p_state.i
index 90f157e0ab..318fe1c463 100644
--- a/src/gallium/state_trackers/python/p_state.i
+++ b/src/gallium/state_trackers/python/p_state.i
@@ -44,6 +44,20 @@
%array_class(struct pipe_stencil_state, StencilArray);
+%extend pipe_rt_blend_state
+{
+ struct pipe_rt_blend_state *
+ __getitem__(int index)
+ {
+ if(index < 0 || index >= PIPE_MAX_COLOR_BUFS)
+ SWIG_exception(SWIG_ValueError, "index out of bounds");
+ return $self + index;
+ fail:
+ return NULL;
+ };
+};
+
+
%extend pipe_framebuffer_state {
pipe_framebuffer_state(void) {