From 1b06c24ae68328c687d0f48ab5ded5dc111b914f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 14 Nov 2012 14:49:52 +0100 Subject: [PATCH] Physics: properly instantiate and export global debugdraw manager instance. Otherwise it failed at runtime on assertion in instance(). --- src/Physics/DebugDrawResourceManager.cpp | 2 ++ src/Physics/DebugDrawResourceManager.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/Physics/DebugDrawResourceManager.cpp b/src/Physics/DebugDrawResourceManager.cpp index ed9f64d75..8e958bc57 100644 --- a/src/Physics/DebugDrawResourceManager.cpp +++ b/src/Physics/DebugDrawResourceManager.cpp @@ -13,6 +13,8 @@ GNU Lesser General Public License version 3 for more details. */ +#define MAGNUM_RESOURCEMANAGER_DEFINE_INTERNALINSTANCE + #include "DebugDrawResourceManager.h" #include "AbstractShaderProgram.h" diff --git a/src/Physics/DebugDrawResourceManager.h b/src/Physics/DebugDrawResourceManager.h index 618b594eb..c8253dfbf 100644 --- a/src/Physics/DebugDrawResourceManager.h +++ b/src/Physics/DebugDrawResourceManager.h @@ -21,7 +21,12 @@ #include "Magnum.h" #include "Color.h" + +#ifndef MAGNUM_RESOURCEMANAGER_DEFINE_INTERNALINSTANCE +#define MAGNUM_RESOURCEMANAGER_DONT_DEFINE_INTERNALINSTANCE +#endif #include "ResourceManager.h" + #include "SceneGraph/SceneGraph.h" #include "magnumPhysicsVisibility.h" @@ -41,6 +46,8 @@ namespace Physics { namespace Implementation { }} #endif +extern template ResourceManager PHYSICS_EXPORT *& ResourceManager::internalInstance(); + namespace Physics { template class AbstractShape;