-/* $XFree86$ */
/**************************************************************************
Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
-/* Display list compiler attempts to store lists of vertices with the
+/**
+ * The display list compiler attempts to store lists of vertices with the
* same vertex layout. Additionally it attempts to minimize the need
* for execute-time fixup of these vertex lists, allowing them to be
* cached on hardware.
-/* This begin is hooked into ... Updating of
- * ctx->Driver.CurrentSavePrimitive is already taken care of.
+/**
+ * Called via ctx->Driver.NotifySaveBegin(ctx, mode) when we get a
+ * glBegin() call while compiling a display list.
+ * See save_Begin() in dlist.c
+ *
+ * This plugs in our special TNL-related display list functions.
+ * All subsequent glBegin/glVertex/glEnd()s found while compiling a
+ * display list will get routed to the functions in this file.
+ *
+ * Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
*/
static GLboolean _save_NotifyBegin( GLcontext *ctx, GLenum mode )
{
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh2" );
}
+/**
+ * This is only called if someone tries to compile nested glBegin()s
+ * in their display list.
+ */
static void GLAPIENTRY _save_Begin( GLenum mode )
{
GET_CURRENT_CONTEXT( ctx );
(void) mode;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "Recursive glBegin" );
+ _mesa_compile_error(ctx, GL_INVALID_OPERATION,
+ "glBegin(called inside glBegin/End)");
}