From 230a5b5f1c9b6c4279384dc6da006f9b65068d12 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 26 Dec 2009 01:14:59 +0000 Subject: python: Update python state tracker and samples for recent interface changes. --- src/gallium/state_trackers/python/p_context.i | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'src/gallium/state_trackers/python/p_context.i') diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i index 3c35e6f745..84ce1a41e6 100644 --- a/src/gallium/state_trackers/python/p_context.i +++ b/src/gallium/state_trackers/python/p_context.i @@ -52,11 +52,16 @@ struct st_context { cso_set_blend($self->cso, state); } - void set_sampler( unsigned index, const struct pipe_sampler_state *state ) { + void set_fragment_sampler( unsigned index, const struct pipe_sampler_state *state ) { cso_single_sampler($self->cso, index, state); cso_single_sampler_done($self->cso); } + void set_vertex_sampler( unsigned index, const struct pipe_sampler_state *state ) { + cso_single_vertex_sampler($self->cso, index, state); + cso_single_vertex_sampler_done($self->cso); + } + void set_rasterizer( const struct pipe_rasterizer_state *state ) { cso_set_rasterizer($self->cso, state); } @@ -161,14 +166,24 @@ struct st_context { cso_set_viewport($self->cso, state); } - void set_sampler_texture(unsigned index, - struct pipe_texture *texture) { + void set_fragment_sampler_texture(unsigned index, + struct pipe_texture *texture) { if(!texture) texture = $self->default_texture; - pipe_texture_reference(&$self->sampler_textures[index], texture); - $self->pipe->set_fragment_sampler_textures($self->pipe, + pipe_texture_reference(&$self->fragment_sampler_textures[index], texture); + $self->pipe->set_fragment_sampler_textures($self->pipe, PIPE_MAX_SAMPLERS, - $self->sampler_textures); + $self->fragment_sampler_textures); + } + + void set_vertex_sampler_texture(unsigned index, + struct pipe_texture *texture) { + if(!texture) + texture = $self->default_texture; + pipe_texture_reference(&$self->vertex_sampler_textures[index], texture); + $self->pipe->set_vertex_sampler_textures($self->pipe, + PIPE_MAX_VERTEX_SAMPLERS, + $self->vertex_sampler_textures); } void set_vertex_buffer(unsigned index, -- cgit v1.2.3