summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-02-05 11:58:52 -0500
committerKristian Høgsberg <[email protected]>2010-02-05 12:01:28 -0500
commitda73c4d5fef6ad20d41de9a4e2d1d86b0b83fd8b (patch)
tree4279c8e414b997fe853dd3001b6e27bc419d7bba /src/mesa
parent697e22146def0a14915d83901063e2068c9980ae (diff)
glapi: Add back the reduced Noop dispatch
This got "simplified" away in e4f168a6f4911a096be97d2e83ef8ad9c5862ec0.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/glapi/glapi_nop.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/glapi/glapi_nop.c b/src/mesa/glapi/glapi_nop.c
index 5d2769c0738..aa84b9a169e 100644
--- a/src/mesa/glapi/glapi_nop.c
+++ b/src/mesa/glapi/glapi_nop.c
@@ -42,6 +42,7 @@
#include "main/glheader.h"
#include "glapi/glapi.h"
+#ifdef DEBUG
/**
* Called by each of the no-op GL entrypoints.
@@ -68,7 +69,6 @@ NoOpUnused(void)
return Warn(" function");
}
-
/*
* Defines for the glapitemp.h functions.
*/
@@ -84,8 +84,24 @@ NoOpUnused(void)
* Defines for the table of no-op entry points.
*/
#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
+
+#else
+
+static void
+NoOpGeneric(void)
+{
+#if !defined(_WIN32_WCE)
+ if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
+ }
+#endif
+}
+
+#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric
+
+#endif
+
#define DISPATCH_TABLE_NAME __glapi_noop_table
#define UNUSED_TABLE_NAME __unused_noop_functions
-
#include "glapi/glapitemp.h"