summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-01-28 19:02:22 +0000
committerBrian Paul <[email protected]>2000-01-28 19:02:22 +0000
commit68ee4bc7caf5a48c8a5c51efc258e74eb9689905 (patch)
tree9f0680d650a1754580c25474560b85dae7b24d4b
parent3228421f69764c10dbbf5cd3df49f133b152515a (diff)
enable/disable no-context warnings depending on MESA_DEBUG
-rw-r--r--src/mesa/main/context.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7b51ebb1191..f654334e9e5 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.34 2000/01/24 16:19:55 brianp Exp $ */
+/* $Id: context.c,v 1.35 2000/01/28 19:02:22 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -450,11 +450,20 @@ static void one_time_init( void )
gl_init_vbrender();
gl_init_vbxform();
gl_init_vertices();
- alreadyCalled = GL_TRUE;
- }
+
+ if (getenv("MESA_DEBUG")) {
+ _glapi_noop_enable_warnings(GL_TRUE);
+ }
+ else {
+ _glapi_noop_enable_warnings(GL_FALSE);
+ }
+
#if defined(DEBUG) && defined(__DATE__) && defined(__TIME__)
fprintf(stderr, "Mesa DEBUG build %s %s\n", __DATE__, __TIME__);
#endif
+
+ alreadyCalled = GL_TRUE;
+ }
}