Browse Source

Prefix *_EXPORT macros with MAGNUM_ to avoid collisions.

pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
2f4092bde0
  1. 2
      src/MeshTools/CompressIndices.h
  2. 4
      src/MeshTools/FlipNormals.h
  3. 2
      src/MeshTools/GenerateFlatNormals.h
  4. 2
      src/MeshTools/Tipsify.h
  5. 6
      src/MeshTools/magnumMeshToolsVisibility.h
  6. 6
      src/Physics/AbstractShape.h
  7. 2
      src/Physics/AxisAlignedBox.h
  8. 2
      src/Physics/Box.h
  9. 2
      src/Physics/Capsule.h
  10. 4
      src/Physics/DebugDrawResourceManager.cpp
  11. 4
      src/Physics/DebugDrawResourceManager.h
  12. 2
      src/Physics/Line.h
  13. 2
      src/Physics/ObjectShape.h
  14. 2
      src/Physics/ObjectShapeGroup.h
  15. 2
      src/Physics/Plane.h
  16. 2
      src/Physics/Point.h
  17. 2
      src/Physics/ShapeGroup.h
  18. 2
      src/Physics/Sphere.h
  19. 6
      src/Physics/magnumPhysicsVisibility.h
  20. 2
      src/SceneGraph/AbstractCamera.h
  21. 8
      src/SceneGraph/Camera.cpp
  22. 2
      src/SceneGraph/Camera2D.h
  23. 2
      src/SceneGraph/Camera3D.h
  24. 2
      src/SceneGraph/MatrixTransformation2D.cpp
  25. 2
      src/SceneGraph/MatrixTransformation3D.cpp
  26. 6
      src/SceneGraph/magnumSceneGraphVisibility.h
  27. 2
      src/Shaders/FlatShader.h
  28. 2
      src/Shaders/PhongShader.h
  29. 2
      src/Shaders/VertexColorShader.h
  30. 6
      src/Shaders/magnumShadersVisibility.h

2
src/MeshTools/CompressIndices.h

@ -31,7 +31,7 @@ namespace Magnum { namespace MeshTools {
#ifndef DOXYGEN_GENERATING_OUTPUT
namespace Implementation {
class MESHTOOLS_EXPORT CompressIndices {
class MAGNUM_MESHTOOLS_EXPORT CompressIndices {
public:
CompressIndices(const std::vector<std::uint32_t>& indices): indices(indices) {}

4
src/MeshTools/FlipNormals.h

@ -34,7 +34,7 @@ namespace Magnum { namespace MeshTools {
The same as flipNormals(std::vector<std::uint32_t>&, std::vector<Vector3>&),
but flips only face winding.
*/
void MESHTOOLS_EXPORT flipFaceWinding(std::vector<std::uint32_t>& indices);
void MAGNUM_MESHTOOLS_EXPORT flipFaceWinding(std::vector<std::uint32_t>& indices);
/**
@brief Flip mesh normals
@ -42,7 +42,7 @@ void MESHTOOLS_EXPORT flipFaceWinding(std::vector<std::uint32_t>& indices);
The same as flipNormals(std::vector<std::uint32_t>&, std::vector<Vector3>&),
but flips only normals, not face winding.
*/
void MESHTOOLS_EXPORT flipNormals(std::vector<Vector3>& normals);
void MAGNUM_MESHTOOLS_EXPORT flipNormals(std::vector<Vector3>& normals);
/**
@brief Flip mesh normals and face winding

2
src/MeshTools/GenerateFlatNormals.h

@ -51,7 +51,7 @@ use the same indices.
@attention Index count must be divisible by 3, otherwise zero length result
is generated.
*/
std::tuple<std::vector<std::uint32_t>, std::vector<Vector3>> MESHTOOLS_EXPORT generateFlatNormals(const std::vector<std::uint32_t>& indices, const std::vector<Point3D>& positions);
std::tuple<std::vector<std::uint32_t>, std::vector<Vector3>> MAGNUM_MESHTOOLS_EXPORT generateFlatNormals(const std::vector<std::uint32_t>& indices, const std::vector<Point3D>& positions);
}}

2
src/MeshTools/Tipsify.h

@ -29,7 +29,7 @@ namespace Magnum { namespace MeshTools {
#ifndef DOXYGEN_GENERATING_OUTPUT
namespace Implementation {
class MESHTOOLS_EXPORT Tipsify {
class MAGNUM_MESHTOOLS_EXPORT Tipsify {
public:
inline Tipsify(std::vector<std::uint32_t>& indices, std::uint32_t vertexCount): indices(indices), vertexCount(vertexCount) {}

6
src/MeshTools/magnumMeshToolsVisibility.h

@ -17,12 +17,12 @@
#ifdef _WIN32
#if defined(MagnumMeshTools_EXPORTS) || defined(MagnumMeshToolsObjects_EXPORTS)
#define MESHTOOLS_EXPORT __declspec(dllexport)
#define MAGNUM_MESHTOOLS_EXPORT __declspec(dllexport)
#else
#define MESHTOOLS_EXPORT __declspec(dllimport)
#define MAGNUM_MESHTOOLS_EXPORT __declspec(dllimport)
#endif
#else
#define MESHTOOLS_EXPORT __attribute__ ((visibility ("default")))
#define MAGNUM_MESHTOOLS_EXPORT __attribute__ ((visibility ("default")))
#endif
#endif

6
src/Physics/AbstractShape.h

@ -65,7 +65,7 @@ namespace Implementation {
See @ref collision-detection for brief introduction.
@see AbstractShape2D, AbstractShape3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT AbstractShape {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT AbstractShape {
public:
/** @brief Dimension count */
static const std::uint8_t Dimensions = dimensions;
@ -126,8 +126,8 @@ typedef AbstractShape<3> AbstractShape3D;
/** @debugoperator{Magnum::Physics::AbstractShape} */
#ifndef DOXYGEN_GENERATING_OUTPUT
Debug PHYSICS_EXPORT operator<<(Debug debug, AbstractShape2D::Type value);
Debug PHYSICS_EXPORT operator<<(Debug debug, AbstractShape3D::Type value);
Debug MAGNUM_PHYSICS_EXPORT operator<<(Debug debug, AbstractShape2D::Type value);
Debug MAGNUM_PHYSICS_EXPORT operator<<(Debug debug, AbstractShape3D::Type value);
#else
template<std::uint8_t dimensions> Debug operator<<(Debug debug, typename AbstractShape<dimensions>::Type value);
#endif

2
src/Physics/AxisAlignedBox.h

@ -31,7 +31,7 @@ namespace Magnum { namespace Physics {
@see AxisAlignedBox2D, AxisAlignedBox3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT AxisAlignedBox: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT AxisAlignedBox: public AbstractShape<dimensions> {
public:
/** @brief Constructor */
inline AxisAlignedBox(const typename DimensionTraits<dimensions>::VectorType& position, const typename DimensionTraits<dimensions>::VectorType& size): _position(position), _transformedPosition(position), _size(size), _transformedSize(size) {}

2
src/Physics/Box.h

@ -33,7 +33,7 @@ namespace Magnum { namespace Physics {
@todo Use quat + position + size instead?
@see Box2D, Box3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT Box: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT Box: public AbstractShape<dimensions> {
public:
/** @brief Constructor */
inline Box(const typename DimensionTraits<dimensions>::MatrixType& transformation): _transformation(transformation), _transformedTransformation(transformation) {}

2
src/Physics/Capsule.h

@ -34,7 +34,7 @@ Unlike other elements the capsule doesn't support asymmetric scaling. When
applying transformation, the scale factor is averaged from all axes.
@see Capsule2D, Capsule3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT Capsule: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT Capsule: public AbstractShape<dimensions> {
public:
/** @brief Constructor */
inline Capsule(const typename DimensionTraits<dimensions>::VectorType& a, const typename DimensionTraits<dimensions>::VectorType& b, float radius): _a(a), _transformedA(a), _b(b), _transformedB(b), _radius(radius), _transformedRadius(radius) {}

4
src/Physics/DebugDrawResourceManager.cpp

@ -43,8 +43,8 @@ template<std::uint8_t dimensions> SceneGraph::Drawable<dimensions>* DebugDrawRes
return renderer;
}
template SceneGraph::Drawable<2> PHYSICS_EXPORT * DebugDrawResourceManager::createDebugRenderer(ObjectShape<2>* shape, ResourceKey options);
template SceneGraph::Drawable<3> PHYSICS_EXPORT * DebugDrawResourceManager::createDebugRenderer(ObjectShape<3>* shape, ResourceKey options);
template SceneGraph::Drawable<2> MAGNUM_PHYSICS_EXPORT * DebugDrawResourceManager::createDebugRenderer(ObjectShape<2>* shape, ResourceKey options);
template SceneGraph::Drawable<3> MAGNUM_PHYSICS_EXPORT * DebugDrawResourceManager::createDebugRenderer(ObjectShape<3>* shape, ResourceKey options);
void DebugDrawResourceManager::createDebugMesh(Implementation::DebugRenderer<2>* renderer, AbstractShape2D* shape) {
switch(shape->type()) {

4
src/Physics/DebugDrawResourceManager.h

@ -43,7 +43,7 @@ namespace Physics { namespace Implementation {
}}
#endif
extern template ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options> PHYSICS_EXPORT *& ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options>::internalInstance();
extern template ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options> MAGNUM_PHYSICS_EXPORT *& ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options>::internalInstance();
namespace Physics {
@ -81,7 +81,7 @@ ObjectShape2D* shape;
group.add(DebugDrawResourceManager::createDebugRenderer(shape, "red"));
@endcode
*/
class PHYSICS_EXPORT DebugDrawResourceManager: public ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options> {
class MAGNUM_PHYSICS_EXPORT DebugDrawResourceManager: public ResourceManager<AbstractShaderProgram, Buffer, Mesh, Physics::Implementation::Options> {
public:
#ifdef DOXYGEN_GENERATING_OUTPUT
/** @brief %Options */

2
src/Physics/Line.h

@ -32,7 +32,7 @@ namespace Magnum { namespace Physics {
@see Line2D, Line3D
@todo collision detection of two Line2D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT Line: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT Line: public AbstractShape<dimensions> {
public:
/** @brief Constructor */
inline Line(const typename DimensionTraits<dimensions>::VectorType& a, const typename DimensionTraits<dimensions>::VectorType& b): _a(a), _transformedA(a), _b(b), _transformedB(b) {}

2
src/Physics/ObjectShape.h

@ -32,7 +32,7 @@ namespace Magnum { namespace Physics {
Adds shape for collision detection to object.
@see ObjectShape2D, ObjectShape3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT ObjectShape: public SceneGraph::AbstractGroupedFeature<dimensions, ObjectShape<dimensions>> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ObjectShape: public SceneGraph::AbstractGroupedFeature<dimensions, ObjectShape<dimensions>> {
public:
/**
* @brief Constructor

2
src/Physics/ObjectShapeGroup.h

@ -34,7 +34,7 @@ namespace Magnum { namespace Physics {
@see ObjectShapeGroup2D, ObjectShapeGroup3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT ObjectShapeGroup: public SceneGraph::FeatureGroup<dimensions, ObjectShape<dimensions>> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ObjectShapeGroup: public SceneGraph::FeatureGroup<dimensions, ObjectShape<dimensions>> {
friend class ObjectShape<dimensions>;
public:

2
src/Physics/Plane.h

@ -28,7 +28,7 @@
namespace Magnum { namespace Physics {
/** @brief Infinite plane, defined by position and normal (3D only) */
class PHYSICS_EXPORT Plane: public AbstractShape<3> {
class MAGNUM_PHYSICS_EXPORT Plane: public AbstractShape<3> {
public:
/** @brief Constructor */
inline Plane(const Vector3& position, const Vector3& normal): _position(position), _transformedPosition(position), _normal(normal), _transformedNormal(normal) {}

2
src/Physics/Point.h

@ -31,7 +31,7 @@ namespace Magnum { namespace Physics {
@see Point2D, Point3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT Point: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT Point: public AbstractShape<dimensions> {
public:
/** @brief Constructor */
inline Point(const typename DimensionTraits<dimensions>::VectorType& position): _position(position), _transformedPosition(position) {}

2
src/Physics/ShapeGroup.h

@ -57,7 +57,7 @@ Result of logical operations on shapes.
See @ref collision-detection for brief introduction.
@see ShapeGroup2D, ShapeGroup3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT ShapeGroup: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ShapeGroup: public AbstractShape<dimensions> {
#ifndef DOXYGEN_GENERATING_OUTPUT
// template<class T> friend constexpr operator~(const T& a) -> enableIfIsBaseType;
// template<class T> friend constexpr operator~(T&& a) -> enableIfIsBaseType;

2
src/Physics/Sphere.h

@ -34,7 +34,7 @@ Unlike other elements the sphere doesn't support asymmetric scaling. When
applying transformation, the scale factor is averaged from all axes.
@see Sphere2D, Sphere3D
*/
template<std::uint8_t dimensions> class PHYSICS_EXPORT Sphere: public AbstractShape<dimensions> {
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT Sphere: public AbstractShape<dimensions> {
public:
/** @brief Constructor */
inline Sphere(const typename DimensionTraits<dimensions>::VectorType& position, float radius): _position(position), _transformedPosition(position), _radius(radius), _transformedRadius(radius) {}

6
src/Physics/magnumPhysicsVisibility.h

@ -17,12 +17,12 @@
#ifdef _WIN32
#ifdef MagnumPhysics_EXPORTS
#define PHYSICS_EXPORT __declspec(dllexport)
#define MAGNUM_PHYSICS_EXPORT __declspec(dllexport)
#else
#define PHYSICS_EXPORT __declspec(dllimport)
#define MAGNUM_PHYSICS_EXPORT __declspec(dllimport)
#endif
#else
#define PHYSICS_EXPORT __attribute__ ((visibility ("default")))
#define MAGNUM_PHYSICS_EXPORT __attribute__ ((visibility ("default")))
#endif
#endif

2
src/SceneGraph/AbstractCamera.h

@ -69,7 +69,7 @@ template<std::uint8_t dimensions, class T>
#else
template<std::uint8_t dimensions, class T = GLfloat>
#endif
class SCENEGRAPH_EXPORT AbstractCamera: public AbstractFeature<dimensions, T> {
class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera: public AbstractFeature<dimensions, T> {
public:
/**
* @brief Constructor

8
src/SceneGraph/Camera.cpp

@ -19,10 +19,10 @@
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class SCENEGRAPH_EXPORT AbstractCamera<2, GLfloat>;
template class SCENEGRAPH_EXPORT AbstractCamera<3, GLfloat>;
template class SCENEGRAPH_EXPORT Camera2D<GLfloat>;
template class SCENEGRAPH_EXPORT Camera3D<GLfloat>;
template class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera<2, GLfloat>;
template class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera<3, GLfloat>;
template class MAGNUM_SCENEGRAPH_EXPORT Camera2D<GLfloat>;
template class MAGNUM_SCENEGRAPH_EXPORT Camera3D<GLfloat>;
#endif
}}

2
src/SceneGraph/Camera2D.h

@ -43,7 +43,7 @@ template<class T>
#else
template<class T = GLfloat>
#endif
class SCENEGRAPH_EXPORT Camera2D: public AbstractCamera<2, T> {
class MAGNUM_SCENEGRAPH_EXPORT Camera2D: public AbstractCamera<2, T> {
public:
/**
* @brief Constructor

2
src/SceneGraph/Camera3D.h

@ -48,7 +48,7 @@ template<class T>
#else
template<class T = GLfloat>
#endif
class SCENEGRAPH_EXPORT Camera3D: public AbstractCamera<3, T> {
class MAGNUM_SCENEGRAPH_EXPORT Camera3D: public AbstractCamera<3, T> {
public:
/**
* @brief Constructor

2
src/SceneGraph/MatrixTransformation2D.cpp

@ -20,7 +20,7 @@
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class SCENEGRAPH_EXPORT Object<MatrixTransformation2D<>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<MatrixTransformation2D<>>;
#endif
}}

2
src/SceneGraph/MatrixTransformation3D.cpp

@ -20,7 +20,7 @@
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class SCENEGRAPH_EXPORT Object<MatrixTransformation3D<>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<MatrixTransformation3D<>>;
#endif
}}

6
src/SceneGraph/magnumSceneGraphVisibility.h

@ -17,13 +17,13 @@
#ifdef _WIN32
#if defined(MagnumSceneGraph_EXPORTS) || defined(MagnumSceneGraphObjects_EXPORTS)
#define SCENEGRAPH_EXPORT __declspec(dllexport)
#define MAGNUM_SCENEGRAPH_EXPORT __declspec(dllexport)
#else
#define SCENEGRAPH_EXPORT __declspec(dllimport)
#define MAGNUM_SCENEGRAPH_EXPORT __declspec(dllimport)
#endif
#define SCENEGRAPH_LOCAL
#else
#define SCENEGRAPH_EXPORT __attribute__ ((visibility ("default")))
#define MAGNUM_SCENEGRAPH_EXPORT __attribute__ ((visibility ("default")))
#define SCENEGRAPH_LOCAL __attribute__ ((visibility ("hidden")))
#endif

2
src/Shaders/FlatShader.h

@ -35,7 +35,7 @@ namespace Magnum { namespace Shaders {
Draws whole mesh with one color.
@see FlatShader2D, FlatShader3D
*/
template<std::uint8_t dimensions> class SHADERS_EXPORT FlatShader: public AbstractShaderProgram {
template<std::uint8_t dimensions> class MAGNUM_SHADERS_EXPORT FlatShader: public AbstractShaderProgram {
public:
/** @brief Vertex position */
typedef Attribute<0, typename DimensionTraits<dimensions>::PointType> Position;

2
src/Shaders/PhongShader.h

@ -33,7 +33,7 @@ namespace Magnum { namespace Shaders {
If supported, uses GLSL 3.20 and @extension{ARB,explicit_attrib_location},
otherwise falls back to GLSL 1.20.
*/
class SHADERS_EXPORT PhongShader: public AbstractShaderProgram {
class MAGNUM_SHADERS_EXPORT PhongShader: public AbstractShaderProgram {
public:
typedef Attribute<0, Point3D> Position; /**< @brief Vertex position */
typedef Attribute<1, Vector3> Normal; /**< @brief Normal direction */

2
src/Shaders/VertexColorShader.h

@ -35,7 +35,7 @@ namespace Magnum { namespace Shaders {
Draws vertex-colored mesh.
@see VertexColorShader2D, VertexColorShader3D
*/
template<std::uint8_t dimensions> class SHADERS_EXPORT VertexColorShader: public AbstractShaderProgram {
template<std::uint8_t dimensions> class MAGNUM_SHADERS_EXPORT VertexColorShader: public AbstractShaderProgram {
public:
/** @brief Vertex position */
typedef Attribute<0, typename DimensionTraits<dimensions>::PointType> Position;

6
src/Shaders/magnumShadersVisibility.h

@ -17,12 +17,12 @@
#ifdef _WIN32
#ifdef MagnumShaders_EXPORTS
#define SHADERS_EXPORT __declspec(dllexport)
#define MAGNUM_SHADERS_EXPORT __declspec(dllexport)
#else
#define SHADERS_EXPORT __declspec(dllimport)
#define MAGNUM_SHADERS_EXPORT __declspec(dllimport)
#endif
#else
#define SHADERS_EXPORT __attribute__ ((visibility ("default")))
#define MAGNUM_SHADERS_EXPORT __attribute__ ((visibility ("default")))
#endif
#endif

Loading…
Cancel
Save