if (!check_valid_to_render(ctx, "glDrawArraysInstanced(invalid to render)"))
return GL_FALSE;
- if (ctx->CompileFlag) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawArraysInstanced(display list");
- return GL_FALSE;
- }
-
if (ctx->Const.CheckArrayBounds) {
if (first + count > (GLint) ctx->Array.ArrayObj->_MaxElement)
return GL_FALSE;
}
+/* GL_ARB_draw_instanced. */
+static void GLAPIENTRY
+save_DrawArraysInstancedARB(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawArraysInstanced() during display list compile");
+}
+
+static void GLAPIENTRY
+save_DrawElementsInstancedARB(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawElementsInstanced() during display list compile");
+}
+
static void invalidate_saved_current_state( struct gl_context *ctx )
{
GLint i;
vfmt->Rectf = save_Rectf;
+ /* GL_ARB_draw_instanced */
+ vfmt->DrawArraysInstanced = save_DrawArraysInstancedARB;
+ vfmt->DrawElementsInstanced = save_DrawElementsInstancedARB;
+
/* The driver is required to implement these as
* 1) They can probably do a better job.
* 2) A lot of new mechanisms would have to be added to this module