aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-07-29 17:39:27 +0800
committerChia-I Wu <[email protected]>2010-07-29 19:40:21 +0800
commitab25c1597ddd60f148cafdbb2ea1e7562c9f9f69 (patch)
treef76eb49062ab5571d72a59151aab4765ed4ad819 /src
parentd4d62b6178c43cff9a0de522c4cf512109cb4b03 (diff)
st/python: Adapt to interface change.
This is only compile tested.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/python/p_context.i39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index cf0144b5dc6..40c4603fb9d 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -289,6 +289,20 @@ struct st_context {
$self->vertex_buffers);
}
+ void set_index_buffer(unsigned index_size,
+ unsigned offset,
+ struct pipe_resource *buffer)
+ {
+ struct pipe_index_buffer ib;
+
+ memset(&ib, 0, sizeof(ib));
+ ib.index_size = index_size;
+ ib.offset = offset;
+ ib.buffer = buffer;
+
+ $self->pipe->set_index_buffer($self->pipe, &ib);
+ }
+
void set_vertex_element(unsigned index,
const struct pipe_vertex_element *element)
{
@@ -308,29 +322,12 @@ struct st_context {
*/
void draw_arrays(unsigned mode, unsigned start, unsigned count) {
- $self->pipe->draw_arrays($self->pipe, mode, start, count);
- }
-
- void draw_elements( struct pipe_resource *indexBuffer,
- unsigned indexSize, int indexBias,
- unsigned mode, unsigned start, unsigned count)
- {
- $self->pipe->draw_elements($self->pipe,
- indexBuffer,
- indexSize,
- indexBias,
- mode, start, count);
+ util_draw_arrays($self->pipe, mode, start, count);
}
- void draw_range_elements( struct pipe_resource *indexBuffer,
- unsigned indexSize, int indexBias,
- unsigned minIndex, unsigned maxIndex,
- unsigned mode, unsigned start, unsigned count)
+ void draw_vbo(const struct pipe_draw_info *info)
{
- $self->pipe->draw_range_elements($self->pipe,
- indexBuffer, indexSize, indexBias,
- minIndex, maxIndex,
- mode, start, count);
+ $self->pipe->draw_vbo($self->pipe, info);
}
void draw_vertices(unsigned prim,
@@ -382,7 +379,7 @@ struct st_context {
pipe->set_vertex_buffers(pipe, 1, &vbuffer);
/* draw */
- pipe->draw_arrays(pipe, prim, 0, num_verts);
+ util_draw_arrays(pipe, prim, 0, num_verts);
cso_restore_vertex_elements($self->cso);