Browse Source

Physics: properly instantiate and export global debugdraw manager instance.

Otherwise it failed at runtime on assertion in instance().
pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
1b06c24ae6
  1. 2
      src/Physics/DebugDrawResourceManager.cpp
  2. 7
      src/Physics/DebugDrawResourceManager.h

2
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"

7
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<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options> PHYSICS_EXPORT *& ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options>::internalInstance();
namespace Physics {
template<std::uint8_t> class AbstractShape;

Loading…
Cancel
Save