{
struct pipe_context *pipe = ctx->st->pipe;
GLuint attr;
- const GLubyte *offset0;
+ const GLubyte *offset0 = NULL;
- for (attr = 0; attr < vp->num_inputs; attr++) {
+ for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
struct gl_buffer_object *bufobj = arrays[mesaAttr]->BufferObj;
struct st_buffer_object *stobj = st_buffer_object(bufobj);
GLuint attr;
struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
unsigned num_vbuffers, num_velements;
- GLboolean userSpace;
+ GLboolean userSpace = GL_FALSE;
+ GLboolean vertDataEdgeFlags;
/* Gallium probably doesn't want this in some cases. */
if (!index_bounds_valid)
* through to driver & draw module. These interfaces still
* need a bit of work...
*/
- setup_edgeflags(ctx, prims[i].mode,
- prims[i].start + indexOffset, prims[i].count,
- arrays[VERT_ATTRIB_EDGEFLAG]);
-
+ prim = translate_prim( ctx, prims[i].mode );
+
pipe->draw_range_elements(pipe, indexBuf, indexSize,
min_index,
max_index,
}
else {
for (i = 0; i < nr_prims; i++) {
- setup_edgeflags(ctx, prims[i].mode,
- prims[i].start + indexOffset, prims[i].count,
- arrays[VERT_ATTRIB_EDGEFLAG]);
-
+ prim = translate_prim( ctx, prims[i].mode );
+
pipe->draw_elements(pipe, indexBuf, indexSize,
- prims[i].mode,
+ prim,
prims[i].start + indexOffset, prims[i].count);
}
}
else {
/* non-indexed */
GLuint i;
+ GLuint prim;
+
for (i = 0; i < nr_prims; i++) {
- setup_edgeflags(ctx, prims[i].mode,
- prims[i].start, prims[i].count,
- arrays[VERT_ATTRIB_EDGEFLAG]);
-
- pipe->draw_arrays(pipe, prims[i].mode, prims[i].start, prims[i].count);
+ prim = translate_prim( ctx, prims[i].mode );
+
+ pipe->draw_arrays(pipe, prim, prims[i].start, prims[i].count);
}
}