Merge branch 'glapi-reorg'
[mesa.git] / src / mesa / main / api_noop.c
index f72f957300d439d1b5486d1766d893d848972573..08b4b4a3b675fc449b7078030b6131f0517dbc81 100644 (file)
@@ -32,7 +32,7 @@
 #include "macros.h"
 #include "dlist.h"
 #include "eval.h"
-#include "glapi/dispatch.h"
+#include "main/dispatch.h"
 
 
 /**
@@ -679,6 +679,16 @@ static void GLAPIENTRY _mesa_noop_End( void )
 }
 
 
+/***
+ * PrimitiveRestart called outside glBegin()/End(): raise an error
+ */
+static void GLAPIENTRY _mesa_noop_PrimitiveRestartNV( void )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartNV(no glBegin)");
+}
+
+
 /**
  * Execute a glRectf() function.  This is not suitable for GL_COMPILE
  * modes (as the test for outside begin/end is not compiled),
@@ -1007,6 +1017,8 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt )
    vfmt->EdgeFlag = _mesa_noop_EdgeFlag;
    vfmt->End = _mesa_noop_End;
 
+   vfmt->PrimitiveRestartNV = _mesa_noop_PrimitiveRestartNV;
+
    _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_);
 
    vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT;