python: Update python state tracker and samples for recent interface changes.

This commit is contained in:
José Fonseca
2009-12-26 01:14:59 +00:00
parent 3f176bf08c
commit 230a5b5f1c
9 changed files with 53 additions and 24 deletions

View File

@@ -135,7 +135,9 @@ st_context_destroy(struct st_context *st_ctx)
st_ctx->pipe->destroy(st_ctx->pipe);
for(i = 0; i < PIPE_MAX_SAMPLERS; ++i)
pipe_texture_reference(&st_ctx->sampler_textures[i], NULL);
pipe_texture_reference(&st_ctx->fragment_sampler_textures[i], NULL);
for(i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; ++i)
pipe_texture_reference(&st_ctx->vertex_sampler_textures[i], NULL);
pipe_texture_reference(&st_ctx->default_texture, NULL);
FREE(st_ctx);
@@ -276,9 +278,12 @@ st_context_create(struct st_device *st_dev)
}
for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
pipe_texture_reference(&st_ctx->sampler_textures[i], st_ctx->default_texture);
pipe_texture_reference(&st_ctx->fragment_sampler_textures[i], st_ctx->default_texture);
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++)
pipe_texture_reference(&st_ctx->vertex_sampler_textures[i], st_ctx->default_texture);
cso_set_sampler_textures(st_ctx->cso, PIPE_MAX_SAMPLERS, st_ctx->sampler_textures);
cso_set_sampler_textures(st_ctx->cso, PIPE_MAX_SAMPLERS, st_ctx->fragment_sampler_textures);
cso_set_vertex_sampler_textures(st_ctx->cso, PIPE_MAX_VERTEX_SAMPLERS, st_ctx->vertex_sampler_textures);
}
/* vertex shader */