python: Tell swig how to index per-rendertarget blend state.
This commit is contained in:
parent
04cc5055db
commit
f1848977e8
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue