From a971bc1dfcf5e07f74be4b28c19ee276c39056d8 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 20:27:23 -0600 Subject: [PATCH] general: Break apart BUILDING_PANDAGL --- panda/src/cocoadisplay/config_cocoadisplay.h | 4 +- panda/src/cocoadisplay/config_cocoadisplay.mm | 4 +- panda/src/framework/pandaFramework.cxx | 2 +- panda/src/glgsg/config_glgsg.cxx | 4 +- panda/src/glgsg/config_glgsg.h | 6 +- panda/src/glgsg/glgsg.h | 4 +- panda/src/glstuff/glmisc_src.h | 6 +- panda/src/glxdisplay/config_glxdisplay.cxx | 4 +- panda/src/glxdisplay/config_glxdisplay.h | 4 +- panda/src/osxdisplay/config_osxdisplay.cxx | 4 +- panda/src/osxdisplay/config_osxdisplay.h | 4 +- panda/src/osxdisplay/osxGraphicsPipe.h | 2 +- panda/src/pandabase/pandasymbols.h | 65 ++++++++++++++++--- panda/src/wgldisplay/config_wgldisplay.cxx | 4 +- panda/src/wgldisplay/config_wgldisplay.h | 4 +- panda/src/wgldisplay/wglGraphicsBuffer.h | 2 +- panda/src/wgldisplay/wglGraphicsPipe.h | 2 +- panda/src/wgldisplay/wglGraphicsWindow.h | 2 +- 18 files changed, 88 insertions(+), 39 deletions(-) diff --git a/panda/src/cocoadisplay/config_cocoadisplay.h b/panda/src/cocoadisplay/config_cocoadisplay.h index a5ed970b8f..43a0e057c3 100644 --- a/panda/src/cocoadisplay/config_cocoadisplay.h +++ b/panda/src/cocoadisplay/config_cocoadisplay.h @@ -18,8 +18,8 @@ #include "notifyCategoryProxy.h" #include "configVariableBool.h" -NotifyCategoryDecl(cocoadisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl(cocoadisplay, EXPCL_PANDA_COCOADISPLAY, EXPTP_PANDA_COCOADISPLAY); -extern EXPCL_PANDAGL void init_libcocoadisplay(); +extern EXPCL_PANDA_COCOADISPLAY void init_libcocoadisplay(); #endif diff --git a/panda/src/cocoadisplay/config_cocoadisplay.mm b/panda/src/cocoadisplay/config_cocoadisplay.mm index c88177cf66..a41e5bc579 100644 --- a/panda/src/cocoadisplay/config_cocoadisplay.mm +++ b/panda/src/cocoadisplay/config_cocoadisplay.mm @@ -20,8 +20,8 @@ #include "dconfig.h" #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_COCOADISPLAY) + #error Buildsystem error: BUILDING_PANDA_COCOADISPLAY not defined #endif Configure(config_cocoadisplay); diff --git a/panda/src/framework/pandaFramework.cxx b/panda/src/framework/pandaFramework.cxx index 26f5f2d3ce..9179aa02f4 100644 --- a/panda/src/framework/pandaFramework.cxx +++ b/panda/src/framework/pandaFramework.cxx @@ -91,7 +91,7 @@ open_framework(int &argc, char **&argv) { // If we're statically linking, we need to explicitly link with at least one // of the available renderers. #if defined(HAVE_GL) - extern EXPCL_PANDAGL void init_libpandagl(); + extern void init_libpandagl(); init_libpandagl(); #elif defined(HAVE_DX9) extern EXPCL_PANDADX void init_libpandadx9(); diff --git a/panda/src/glgsg/config_glgsg.cxx b/panda/src/glgsg/config_glgsg.cxx index 6e60169acc..1c7ddcbfd5 100644 --- a/panda/src/glgsg/config_glgsg.cxx +++ b/panda/src/glgsg/config_glgsg.cxx @@ -16,8 +16,8 @@ #include "dconfig.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_GLGSG) + #error Buildsystem error: BUILDING_PANDA_GLGSG not defined #endif ConfigureDef(config_glgsg); diff --git a/panda/src/glgsg/config_glgsg.h b/panda/src/glgsg/config_glgsg.h index 87220333ed..e2beef8e52 100644 --- a/panda/src/glgsg/config_glgsg.h +++ b/panda/src/glgsg/config_glgsg.h @@ -18,9 +18,9 @@ #include "notifyCategoryProxy.h" #include "dconfig.h" -ConfigureDecl(config_glgsg, EXPCL_PANDAGL, EXPTP_PANDAGL); -NotifyCategoryDecl(glgsg, EXPCL_PANDAGL, EXPTP_PANDAGL); +ConfigureDecl(config_glgsg, EXPCL_PANDA_GLGSG, EXPTP_PANDA_GLGSG); +NotifyCategoryDecl(glgsg, EXPCL_PANDA_GLGSG, EXPTP_PANDA_GLGSG); -extern EXPCL_PANDAGL void init_libglgsg(); +extern EXPCL_PANDA_GLGSG void init_libglgsg(); #endif diff --git a/panda/src/glgsg/glgsg.h b/panda/src/glgsg/glgsg.h index 713ce9e862..b225466ab0 100644 --- a/panda/src/glgsg/glgsg.h +++ b/panda/src/glgsg/glgsg.h @@ -37,8 +37,8 @@ #define GLSYSTEM_NAME "OpenGL" #define CONFIGOBJ config_glgsg #define GLCAT glgsg_cat -#define EXPCL_GL EXPCL_PANDAGL -#define EXPTP_GL EXPTP_PANDAGL +#define EXPCL_GL EXPCL_PANDA_GLGSG +#define EXPTP_GL EXPTP_PANDA_GLGSG #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 2) #define EXPECT_GL_VERSION_1_2 diff --git a/panda/src/glstuff/glmisc_src.h b/panda/src/glstuff/glmisc_src.h index 5ba0b35d20..3c6dd81e7b 100644 --- a/panda/src/glstuff/glmisc_src.h +++ b/panda/src/glstuff/glmisc_src.h @@ -40,8 +40,8 @@ // #define GSG_VERBOSE 1 -extern ConfigVariableInt gl_version; -extern EXPCL_PANDAGL ConfigVariableBool gl_support_fbo; +extern EXPCL_GL ConfigVariableInt gl_version; +extern EXPCL_GL ConfigVariableBool gl_support_fbo; extern ConfigVariableBool gl_cheap_textures; extern ConfigVariableBool gl_ignore_clamp; extern ConfigVariableBool gl_support_clamp_to_border; @@ -58,7 +58,7 @@ extern ConfigVariableBool gl_interleaved_arrays; extern ConfigVariableBool gl_parallel_arrays; extern ConfigVariableInt gl_max_errors; extern ConfigVariableEnum gl_min_buffer_usage_hint; -extern ConfigVariableBool gl_debug; +extern EXPCL_GL ConfigVariableBool gl_debug; extern ConfigVariableBool gl_debug_synchronous; extern ConfigVariableEnum gl_debug_abort_level; extern ConfigVariableBool gl_debug_object_labels; diff --git a/panda/src/glxdisplay/config_glxdisplay.cxx b/panda/src/glxdisplay/config_glxdisplay.cxx index fffcd2c264..23b8aef8fa 100644 --- a/panda/src/glxdisplay/config_glxdisplay.cxx +++ b/panda/src/glxdisplay/config_glxdisplay.cxx @@ -23,8 +23,8 @@ #include "dconfig.h" #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_GLXDISPLAY) + #error Buildsystem error: BUILDING_PANDA_GLXDISPLAY not defined #endif Configure(config_glxdisplay); diff --git a/panda/src/glxdisplay/config_glxdisplay.h b/panda/src/glxdisplay/config_glxdisplay.h index 7c8aadc3b9..9cabb2de39 100644 --- a/panda/src/glxdisplay/config_glxdisplay.h +++ b/panda/src/glxdisplay/config_glxdisplay.h @@ -20,9 +20,9 @@ #include "configVariableBool.h" #include "configVariableInt.h" -NotifyCategoryDecl(glxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl(glxdisplay, EXPCL_PANDA_GLXDISPLAY, EXPTP_PANDA_GLXDISPLAY); -extern EXPCL_PANDAGL void init_libglxdisplay(); +extern EXPCL_PANDA_GLXDISPLAY void init_libglxdisplay(); extern ConfigVariableBool glx_get_proc_address; extern ConfigVariableBool glx_get_os_address; diff --git a/panda/src/osxdisplay/config_osxdisplay.cxx b/panda/src/osxdisplay/config_osxdisplay.cxx index 4ac68f5e58..43f897b862 100644 --- a/panda/src/osxdisplay/config_osxdisplay.cxx +++ b/panda/src/osxdisplay/config_osxdisplay.cxx @@ -20,8 +20,8 @@ #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_OSXDISPLAY) + #error Buildsystem error: BUILDING_PANDA_OSXDISPLAY not defined #endif Configure(config_osxdisplay); diff --git a/panda/src/osxdisplay/config_osxdisplay.h b/panda/src/osxdisplay/config_osxdisplay.h index cedaff1e3e..5eadc80a7e 100644 --- a/panda/src/osxdisplay/config_osxdisplay.h +++ b/panda/src/osxdisplay/config_osxdisplay.h @@ -17,9 +17,9 @@ #include "configVariableBool.h" #include "configVariableInt.h" -NotifyCategoryDecl( osxdisplay , EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl( osxdisplay , EXPCL_PANDA_OSXDISPLAY, EXPTP_PANDA_OSXDISPLAY); -extern EXPCL_PANDAGL void init_libosxdisplay(); +extern EXPCL_PANDA_OSXDISPLAY void init_libosxdisplay(); extern ConfigVariableBool show_resize_box; extern ConfigVariableBool osx_support_gl_buffer; diff --git a/panda/src/osxdisplay/osxGraphicsPipe.h b/panda/src/osxdisplay/osxGraphicsPipe.h index 02cc60576c..75094778d6 100644 --- a/panda/src/osxdisplay/osxGraphicsPipe.h +++ b/panda/src/osxdisplay/osxGraphicsPipe.h @@ -24,7 +24,7 @@ class PNMImage; * This graphics pipe represents the interface for creating OpenGL graphics * windows on the various OSX's. */ -class EXPCL_PANDAGL osxGraphicsPipe : public GraphicsPipe { +class EXPCL_PANDA_OSXDISPLAY osxGraphicsPipe : public GraphicsPipe { public: osxGraphicsPipe(); virtual ~osxGraphicsPipe(); diff --git a/panda/src/pandabase/pandasymbols.h b/panda/src/pandabase/pandasymbols.h index 5d5d78ef75..ef83b4314e 100644 --- a/panda/src/pandabase/pandasymbols.h +++ b/panda/src/pandabase/pandasymbols.h @@ -117,6 +117,15 @@ #define BUILDING_PANDA_EXPRESS #endif +/* BUILDING_PANDAGL for these: */ +#ifdef BUILDING_PANDAGL + #define BUILDING_PANDA_COCOADISPLAY + #define BUILDING_PANDA_GLGSG + #define BUILDING_PANDA_GLXDISPLAY + #define BUILDING_PANDA_OSXDISPLAY + #define BUILDING_PANDA_WGLDISPLAY +#endif + /* BUILDING_PANDAPHYSICS for these: */ #ifdef BUILDING_PANDAPHYSICS #define BUILDING_PANDA_PARTICLESYSTEM @@ -155,6 +164,14 @@ #define EXPTP_PANDA_CHAR IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_COCOADISPLAY + #define EXPCL_PANDA_COCOADISPLAY EXPORT_CLASS + #define EXPTP_PANDA_COCOADISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_COCOADISPLAY IMPORT_CLASS + #define EXPTP_PANDA_COCOADISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_COLLIDE #define EXPCL_PANDA_COLLIDE EXPORT_CLASS #define EXPTP_PANDA_COLLIDE EXPORT_TEMPL @@ -243,6 +260,22 @@ #define EXPTP_PANDA_EXPRESS IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_GLGSG + #define EXPCL_PANDA_GLGSG EXPORT_CLASS + #define EXPTP_PANDA_GLGSG EXPORT_TEMPL +#else + #define EXPCL_PANDA_GLGSG IMPORT_CLASS + #define EXPTP_PANDA_GLGSG IMPORT_TEMPL +#endif + +#ifdef BUILDING_PANDA_GLXDISPLAY + #define EXPCL_PANDA_GLXDISPLAY EXPORT_CLASS + #define EXPTP_PANDA_GLXDISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_GLXDISPLAY IMPORT_CLASS + #define EXPTP_PANDA_GLXDISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_GOBJ #define EXPCL_PANDA_GOBJ EXPORT_CLASS #define EXPTP_PANDA_GOBJ EXPORT_TEMPL @@ -307,6 +340,14 @@ #define EXPTP_PANDA_NET IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_OSXDISPLAY + #define EXPCL_PANDA_OSXDISPLAY EXPORT_CLASS + #define EXPTP_PANDA_OSXDISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_OSXDISPLAY IMPORT_CLASS + #define EXPTP_PANDA_OSXDISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_PARAMETRICS #define EXPCL_PANDA_PARAMETRICS EXPORT_CLASS #define EXPTP_PANDA_PARAMETRICS EXPORT_TEMPL @@ -427,6 +468,14 @@ #define EXPTP_PANDA_TFORM IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_WGLDISPLAY + #define EXPCL_PANDA_WGLDISPLAY EXPORT_CLASS + #define EXPTP_PANDA_WGLDISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_WGLDISPLAY IMPORT_CLASS + #define EXPTP_PANDA_WGLDISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDAAWESOMIUM #define EXPCL_PANDAAWESOMIUM EXPORT_CLASS #define EXPTP_PANDAAWESOMIUM EXPORT_TEMPL @@ -435,6 +484,14 @@ #define EXPTP_PANDAAWESOMIUM IMPORT_TEMPL #endif +#ifdef BUILDING_PANDAGL + #define EXPCL_PANDAGL EXPORT_CLASS + #define EXPTP_PANDAGL EXPORT_TEMPL +#else + #define EXPCL_PANDAGL IMPORT_CLASS + #define EXPTP_PANDAGL IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDABULLET #define EXPCL_PANDABULLET EXPORT_CLASS #define EXPTP_PANDABULLET EXPORT_TEMPL @@ -467,14 +524,6 @@ #define EXPTP_PANDAFX IMPORT_TEMPL #endif -#ifdef BUILDING_PANDAGL - #define EXPCL_PANDAGL EXPORT_CLASS - #define EXPTP_PANDAGL EXPORT_TEMPL -#else - #define EXPCL_PANDAGL IMPORT_CLASS - #define EXPTP_PANDAGL IMPORT_TEMPL -#endif - #ifdef BUILDING_PANDAGLES #define EXPCL_PANDAGLES EXPORT_CLASS #define EXPTP_PANDAGLES EXPORT_TEMPL diff --git a/panda/src/wgldisplay/config_wgldisplay.cxx b/panda/src/wgldisplay/config_wgldisplay.cxx index 93dc2ad36c..fa04606dca 100644 --- a/panda/src/wgldisplay/config_wgldisplay.cxx +++ b/panda/src/wgldisplay/config_wgldisplay.cxx @@ -20,8 +20,8 @@ #include "dconfig.h" #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_WGLDISPLAY) + #error Buildsystem error: BUILDING_PANDA_WGLDISPLAY not defined #endif Configure(config_wgldisplay); diff --git a/panda/src/wgldisplay/config_wgldisplay.h b/panda/src/wgldisplay/config_wgldisplay.h index 400b565bbd..e4c2096b5e 100644 --- a/panda/src/wgldisplay/config_wgldisplay.h +++ b/panda/src/wgldisplay/config_wgldisplay.h @@ -19,12 +19,12 @@ #include "configVariableInt.h" #include "configVariableBool.h" -NotifyCategoryDecl(wgldisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl(wgldisplay, EXPCL_PANDA_WGLDISPLAY, EXPTP_PANDA_WGLDISPLAY); extern ConfigVariableInt gl_force_pixfmt; extern ConfigVariableBool gl_force_invalid; extern ConfigVariableBool gl_do_vidmemsize_check; -extern EXPCL_PANDAGL void init_libwgldisplay(); +extern EXPCL_PANDA_WGLDISPLAY void init_libwgldisplay(); #endif diff --git a/panda/src/wgldisplay/wglGraphicsBuffer.h b/panda/src/wgldisplay/wglGraphicsBuffer.h index 594adc921d..3560d3f4b5 100644 --- a/panda/src/wgldisplay/wglGraphicsBuffer.h +++ b/panda/src/wgldisplay/wglGraphicsBuffer.h @@ -32,7 +32,7 @@ * we can use, and thus makes it difficult to support one GSG rendering into * an offscreen buffer and also into a window. */ -class EXPCL_PANDAGL wglGraphicsBuffer : public GraphicsBuffer { +class EXPCL_PANDA_WGLDISPLAY wglGraphicsBuffer : public GraphicsBuffer { public: wglGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, const std::string &name, diff --git a/panda/src/wgldisplay/wglGraphicsPipe.h b/panda/src/wgldisplay/wglGraphicsPipe.h index 892a8f8884..176483f92c 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.h +++ b/panda/src/wgldisplay/wglGraphicsPipe.h @@ -23,7 +23,7 @@ class wglGraphicsStateGuardian; * This graphics pipe represents the interface for creating OpenGL graphics * windows on the various Windows OSes. */ -class EXPCL_PANDAGL wglGraphicsPipe : public WinGraphicsPipe { +class EXPCL_PANDA_WGLDISPLAY wglGraphicsPipe : public WinGraphicsPipe { public: wglGraphicsPipe(); virtual ~wglGraphicsPipe(); diff --git a/panda/src/wgldisplay/wglGraphicsWindow.h b/panda/src/wgldisplay/wglGraphicsWindow.h index 0db8f9cc73..06a74aa501 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.h +++ b/panda/src/wgldisplay/wglGraphicsWindow.h @@ -20,7 +20,7 @@ /** * A single graphics window for rendering OpenGL under Microsoft Windows. */ -class EXPCL_PANDAGL wglGraphicsWindow : public WinGraphicsWindow { +class EXPCL_PANDA_WGLDISPLAY wglGraphicsWindow : public WinGraphicsWindow { public: wglGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, const std::string &name,