summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/p_context.i
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-12-26 01:14:59 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-12-26 01:14:59 +0000
commit230a5b5f1c9b6c4279384dc6da006f9b65068d12 (patch)
treef9febfd5f43b2585f4c5c884616642f8023e722f /src/gallium/state_trackers/python/p_context.i
parent3f176bf08cd729d67a00d2bd073f29286b1f9a29 (diff)
python: Update python state tracker and samples for recent interface changes.
Diffstat (limited to 'src/gallium/state_trackers/python/p_context.i')
-rw-r--r--src/gallium/state_trackers/python/p_context.i27
1 files changed, 21 insertions, 6 deletions
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,