Browse Source

unsafe to define USE_MGL_NAMESPACE globally

David Rose 22 years ago
parent
commit
9089fa3820

+ 2 - 2
dtool/Config.pp

@@ -297,11 +297,11 @@
 // only need to define HAVE_MESA if you want to run totally headless,
 // only need to define HAVE_MESA if you want to run totally headless,
 // or if you want to be able to easily switch between Mesa and the
 // or if you want to be able to easily switch between Mesa and the
 // system OpenGL implementation at runtime.  If you compiled Mesa with
 // system OpenGL implementation at runtime.  If you compiled Mesa with
-// USE_MGL_NAMESPACE defined, define it also here.
+// USE_MGL_NAMESPACE defined, define MESA_MGL here.
 #define MESA_IPATH
 #define MESA_IPATH
 #define MESA_LPATH
 #define MESA_LPATH
 #define MESA_LIBS
 #define MESA_LIBS
-#define USE_MGL_NAMESPACE
+#define MESA_MGL
 #defer HAVE_MESA $[libtest $[MESA_LPATH],$[MESA_LIBS]]
 #defer HAVE_MESA $[libtest $[MESA_LPATH],$[MESA_LIBS]]
 
 
 
 

+ 1 - 1
dtool/LocalSetup.pp

@@ -69,7 +69,7 @@ $[cdefine HAVE_GL]
 
 
 /* Define if we have Mesa installed and want to build mesadisplay.  */
 /* Define if we have Mesa installed and want to build mesadisplay.  */
 $[cdefine HAVE_MESA]
 $[cdefine HAVE_MESA]
-$[cdefine USE_MGL_NAMESPACE]
+$[cdefine MESA_MGL]
 
 
 /* Define if we want to build with SGI OpenGL extensions.  */
 /* Define if we want to build with SGI OpenGL extensions.  */
 $[cdefine HAVE_SGIGL]
 $[cdefine HAVE_SGIGL]

+ 3 - 1
panda/src/mesadisplay/mesagsg.h

@@ -26,8 +26,9 @@
 #include "pandabase.h"
 #include "pandabase.h"
 #include "config_mesadisplay.h"
 #include "config_mesadisplay.h"
 
 
-#ifdef USE_MGL_NAMESPACE
+#ifdef MESA_MGL
   #define GLP(name) mgl##name
   #define GLP(name) mgl##name
+  #define USE_MGL_NAMESPACE 1
 #else
 #else
   #define GLP(name) gl##name
   #define GLP(name) gl##name
 #endif
 #endif
@@ -40,6 +41,7 @@
 
 
 #include <GL/gl.h>
 #include <GL/gl.h>
 #include <GL/glu.h>
 #include <GL/glu.h>
+#include <GL/osmesa.h>
 
 
 #include "glstuff_src.h"
 #include "glstuff_src.h"
 
 

+ 1 - 2
panda/src/mesadisplay/osMesaGraphicsPipe.h

@@ -22,8 +22,7 @@
 #include "pandabase.h"
 #include "pandabase.h"
 #include "graphicsWindow.h"
 #include "graphicsWindow.h"
 #include "graphicsPipe.h"
 #include "graphicsPipe.h"
-
-#include <GL/osmesa.h>
+#include "mesagsg.h"
 
 
 class FrameBufferProperties;
 class FrameBufferProperties;
 
 

+ 0 - 2
panda/src/mesadisplay/osMesaGraphicsStateGuardian.h

@@ -22,8 +22,6 @@
 #include "pandabase.h"
 #include "pandabase.h"
 #include "mesagsg.h"
 #include "mesagsg.h"
 
 
-#include <GL/osmesa.h>
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //       Class : OSMesaGraphicsStateGuardian
 //       Class : OSMesaGraphicsStateGuardian
 // Description : A tiny specialization on MesaGraphicsStateGuardian to
 // Description : A tiny specialization on MesaGraphicsStateGuardian to