From 9089fa3820451c92880af68e6e503fda2715905e Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 10 Feb 2004 18:49:02 +0000 Subject: [PATCH] unsafe to define USE_MGL_NAMESPACE globally --- dtool/Config.pp | 4 ++-- dtool/LocalSetup.pp | 2 +- panda/src/mesadisplay/mesagsg.h | 4 +++- panda/src/mesadisplay/osMesaGraphicsPipe.h | 3 +-- panda/src/mesadisplay/osMesaGraphicsStateGuardian.h | 2 -- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dtool/Config.pp b/dtool/Config.pp index 54c6c1f162..07ae06a5d7 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -297,11 +297,11 @@ // 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 // 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_LPATH #define MESA_LIBS -#define USE_MGL_NAMESPACE +#define MESA_MGL #defer HAVE_MESA $[libtest $[MESA_LPATH],$[MESA_LIBS]] diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 1280b9ed63..c905a90472 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -69,7 +69,7 @@ $[cdefine HAVE_GL] /* Define if we have Mesa installed and want to build mesadisplay. */ $[cdefine HAVE_MESA] -$[cdefine USE_MGL_NAMESPACE] +$[cdefine MESA_MGL] /* Define if we want to build with SGI OpenGL extensions. */ $[cdefine HAVE_SGIGL] diff --git a/panda/src/mesadisplay/mesagsg.h b/panda/src/mesadisplay/mesagsg.h index a833219f89..898bd5f564 100644 --- a/panda/src/mesadisplay/mesagsg.h +++ b/panda/src/mesadisplay/mesagsg.h @@ -26,8 +26,9 @@ #include "pandabase.h" #include "config_mesadisplay.h" -#ifdef USE_MGL_NAMESPACE +#ifdef MESA_MGL #define GLP(name) mgl##name + #define USE_MGL_NAMESPACE 1 #else #define GLP(name) gl##name #endif @@ -40,6 +41,7 @@ #include #include +#include #include "glstuff_src.h" diff --git a/panda/src/mesadisplay/osMesaGraphicsPipe.h b/panda/src/mesadisplay/osMesaGraphicsPipe.h index 7ba016afef..3bc946433f 100644 --- a/panda/src/mesadisplay/osMesaGraphicsPipe.h +++ b/panda/src/mesadisplay/osMesaGraphicsPipe.h @@ -22,8 +22,7 @@ #include "pandabase.h" #include "graphicsWindow.h" #include "graphicsPipe.h" - -#include +#include "mesagsg.h" class FrameBufferProperties; diff --git a/panda/src/mesadisplay/osMesaGraphicsStateGuardian.h b/panda/src/mesadisplay/osMesaGraphicsStateGuardian.h index 32d48cdf14..dbf6f86e40 100644 --- a/panda/src/mesadisplay/osMesaGraphicsStateGuardian.h +++ b/panda/src/mesadisplay/osMesaGraphicsStateGuardian.h @@ -22,8 +22,6 @@ #include "pandabase.h" #include "mesagsg.h" -#include - //////////////////////////////////////////////////////////////////// // Class : OSMesaGraphicsStateGuardian // Description : A tiny specialization on MesaGraphicsStateGuardian to