summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_api.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-10-21 19:05:40 -0600
committerBrian Paul <brianp@vmware.com>2010-10-21 19:05:47 -0600
commit69a07be3e527dbc2148a4e20c50e60266225f5f2 (patch)
tree82583b98708fc7a6c33b471d45670e2566ed0daf /src/mesa/vbo/vbo_exec_api.c
parent1d91f8d9164b38b4c924f43ec4fc5ceb65c96a78 (diff)
parentb2d4dfe5cc5b24743175bf35285dfc57f86bc09d (diff)
Merge branch 'primitive-restart-cleanup'
Conflicts: docs/relnotes-7.10.html This branch is a re-do of the primitive-restart branch with all the intermediate/temporary stuff cleaned out.
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 80ca1d866e..1ef4917419 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -568,6 +568,28 @@ static void GLAPIENTRY vbo_exec_End( void )
}
+/**
+ * Called via glPrimitiveRestartNV()
+ */
+static void GLAPIENTRY
+vbo_exec_PrimitiveRestartNV(void)
+{
+ GLenum curPrim;
+ GET_CURRENT_CONTEXT( ctx );
+
+ curPrim = ctx->Driver.CurrentExecPrimitive;
+
+ if (curPrim == PRIM_OUTSIDE_BEGIN_END) {
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glPrimitiveRestartNV" );
+ }
+ else {
+ vbo_exec_End();
+ vbo_exec_Begin(curPrim);
+ }
+}
+
+
+
static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
{
GLvertexformat *vfmt = &exec->vtxfmt;
@@ -576,6 +598,7 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
vfmt->Begin = vbo_exec_Begin;
vfmt->End = vbo_exec_End;
+ vfmt->PrimitiveRestartNV = vbo_exec_PrimitiveRestartNV;
_MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_);
_MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_);