softpipe_init_shader_funcs(&softpipe->pipe);
- softpipe->pipe.create_vertex_elements_state = softpipe_create_vertex_elements_state;
- softpipe->pipe.bind_vertex_elements_state = softpipe_bind_vertex_elements_state;
- softpipe->pipe.delete_vertex_elements_state = softpipe_delete_vertex_elements_state;
+ softpipe_init_vertex_funcs(&softpipe->pipe);
softpipe->pipe.create_stream_output_state = softpipe_create_stream_output_state;
softpipe->pipe.bind_stream_output_state = softpipe_bind_stream_output_state;
softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
softpipe->pipe.set_stream_output_buffers = softpipe_set_stream_output_buffers;
- softpipe->pipe.set_vertex_buffers = softpipe_set_vertex_buffers;
- softpipe->pipe.set_index_buffer = softpipe_set_index_buffer;
softpipe->pipe.draw_vbo = softpipe_draw_vbo;
softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
void
softpipe_init_shader_funcs(struct pipe_context *pipe);
-void *softpipe_create_vertex_elements_state(struct pipe_context *,
- unsigned count,
- const struct pipe_vertex_element *);
-void softpipe_bind_vertex_elements_state(struct pipe_context *, void *);
-void softpipe_delete_vertex_elements_state(struct pipe_context *, void *);
+void
+softpipe_init_vertex_funcs(struct pipe_context *pipe);
void softpipe_set_polygon_stipple( struct pipe_context *,
const struct pipe_poly_stipple * );
void softpipe_set_viewport_state( struct pipe_context *,
const struct pipe_viewport_state * );
-void softpipe_set_vertex_buffers(struct pipe_context *,
- unsigned count,
- const struct pipe_vertex_buffer *);
-
-void softpipe_set_index_buffer(struct pipe_context *,
- const struct pipe_index_buffer *);
-
void softpipe_update_derived( struct softpipe_context *softpipe );
#include "draw/draw_context.h"
-void *
+static void *
softpipe_create_vertex_elements_state(struct pipe_context *pipe,
unsigned count,
const struct pipe_vertex_element *attribs)
return velems;
}
-void
+
+static void
softpipe_bind_vertex_elements_state(struct pipe_context *pipe,
void *velems)
{
draw_set_vertex_elements(softpipe->draw, sp_velems->count, sp_velems->velem);
}
-void
+
+static void
softpipe_delete_vertex_elements_state(struct pipe_context *pipe, void *velems)
{
FREE( velems );
}
-void
+
+static void
softpipe_set_vertex_buffers(struct pipe_context *pipe,
unsigned count,
const struct pipe_vertex_buffer *buffers)
draw_set_vertex_buffers(softpipe->draw, count, buffers);
}
-void
+
+static void
softpipe_set_index_buffer(struct pipe_context *pipe,
const struct pipe_index_buffer *ib)
{
draw_set_index_buffer(softpipe->draw, ib);
}
+
+
+void
+softpipe_init_vertex_funcs(struct pipe_context *pipe)
+{
+ pipe->create_vertex_elements_state = softpipe_create_vertex_elements_state;
+ pipe->bind_vertex_elements_state = softpipe_bind_vertex_elements_state;
+ pipe->delete_vertex_elements_state = softpipe_delete_vertex_elements_state;
+
+ pipe->set_vertex_buffers = softpipe_set_vertex_buffers;
+ pipe->set_index_buffer = softpipe_set_index_buffer;
+}