#include "main/glheader.h"
#include "glapi/glapi.h"
+#ifdef DEBUG
/**
* Called by each of the no-op GL entrypoints.
return Warn(" function");
}
-
/*
* Defines for the glapitemp.h functions.
*/
* 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"