summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/dlist.h')
-rw-r--r--src/mesa/main/dlist.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index 5d6faf9..a8cd34d 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -1,4 +1,4 @@
-/* $Id: dlist.h,v 1.9 2000/11/24 15:21:59 keithw Exp $ */
+/* $Id: dlist.h,v 1.10 2000/12/26 05:09:28 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,6 +32,30 @@
#include "mtypes.h"
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval) \
+do { \
+ if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { \
+ gl_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \
+ return retval; \
+ } \
+} while (0)
+
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx) \
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx,)
+
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx) \
+do { \
+ ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx); \
+ FLUSH_VERTICES(ctx, 0); \
+} while (0)
+
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval)\
+do { \
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval); \
+ FLUSH_VERTICES(ctx, 0); \
+} while (0)
+
+
extern void gl_init_lists( void );
extern void gl_destroy_list( GLcontext *ctx, GLuint list );