From 92d7ed8a20d4a018ce5324e6537ae7b478b9e5bf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 27 Aug 2009 10:09:24 -0700 Subject: mesa: Add support for ARB_draw_elements_base_vertex. --- src/mesa/vbo/vbo_split.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/vbo/vbo_split.c') diff --git a/src/mesa/vbo/vbo_split.c b/src/mesa/vbo/vbo_split.c index 58e879628d..c445acca7d 100644 --- a/src/mesa/vbo/vbo_split.c +++ b/src/mesa/vbo/vbo_split.c @@ -50,6 +50,7 @@ #include "main/glheader.h" #include "main/imports.h" #include "main/mtypes.h" +#include "main/macros.h" #include "vbo_split.h" #include "vbo.h" @@ -107,7 +108,12 @@ void vbo_split_prims( GLcontext *ctx, vbo_draw_func draw, const struct split_limits *limits ) { - + GLuint max_basevertex = prim->basevertex; + GLuint i; + + for (i = 1; i < nr_prims; i++) + max_basevertex = MAX2(max_basevertex, prim[i].basevertex); + if (ib) { if (limits->max_indices == 0) { /* Could traverse the indices, re-emitting vertices in turn. -- cgit v1.2.3