summaryrefslogtreecommitdiff
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-20 21:02:09 -0600
committerBrian Paul <brianp@vmware.com>2010-04-20 21:02:09 -0600
commita40e6f220ac7e41126b9815db27d362bda719bf6 (patch)
treee33791e75fff35af2d90d258d892aef14f9921db /src/mesa/main/varray.c
parentbd1d35fb5d3c889b11de5a1d493f711fc091fbed (diff)
mesa: API and state for GL 3.1 primitive restart
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index b4128f84d8..5f255b39b7 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1054,6 +1054,27 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
/**
+ * GL 3.1 glPrimitiveRestartIndex().
+ */
+void GLAPIENTRY
+_mesa_PrimitiveRestartIndex(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndex()");
+ return;
+ }
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+
+ ctx->Array.RestartIndex = index;
+}
+
+
+/**
* Copy one client vertex array to another.
*/
void