summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-10-21 19:03:38 -0600
committerBrian Paul <[email protected]>2010-10-21 19:03:38 -0600
commit7f26ad80ba74b9c78a3735caee202e1868f6ff58 (patch)
tree8a6150c94813626510dd3f2282db421de1be9663 /src/mesa/main/varray.c
parenta80afbd99e879d36fdb4b099fd49c1f75edc8886 (diff)
mesa: set/get primitive restart state
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index acab9e0e924..56749355cdf 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1315,15 +1315,16 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
/**
- * GL 3.1 glPrimitiveRestartIndex().
+ * GL_NV_primitive_restart and GL 3.1
*/
void GLAPIENTRY
_mesa_PrimitiveRestartIndex(GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
- if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndex()");
+ if (!ctx->Extensions.NV_primitive_restart &&
+ ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndexNV()");
return;
}