From deb629dde186b6073d3e68b7b174e0725141c2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 16:52:50 +0100 Subject: [PATCH 01/10] Doc: extended best practices page for future additions. --- doc/best-practices.dox | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/doc/best-practices.dox b/doc/best-practices.dox index c3f500338..7883be334 100644 --- a/doc/best-practices.dox +++ b/doc/best-practices.dox @@ -1,6 +1,9 @@ -/** @page best-practices Best practices in OpenGL +namespace Magnum { +/** @page best-practices Best practices and platform-specific information -@brief Platform-specific and general performance advices +@brief Performance advices and solutions for platform-specific issues + +@tableofcontents Here is collection of carefully selected links to official guidelines and other articles with valuable information to help developers create better @@ -8,8 +11,23 @@ applications. Feel free to add one, if it contains new unique information. @section best-practices-platform Platform-specific -- Mac OS - [Best Practices for Working with Vertex Data](https://developer.apple.com/library/mac/#documentation/graphicsimaging/Conceptual/OpenGL-MacProgGuide/opengl_vertexdata/opengl_vertexdata.html), [Best Practices for Working with Texture Data](https://developer.apple.com/library/mac/#documentation/graphicsimaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/opengl_texturedata.html) -- iOS - [Best Practices for Working with Vertex Data](http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html), [Best Practices for Working with Texture Data](http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesForWorkingWithTextureData/TechniquesForWorkingWithTextureData.html), [Best Practices for Shaders](http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/BestPracticesforShaders/BestPracticesforShaders.html#//apple_ref/doc/uid/TP40008793-CH7-SW3) -- Google Chrome Native Client - [Best practices for 3D graphics](https://developers.google.com/native-client/beta/devguide/coding/3D-graphics#best-practices) +Some platforms need special care, see their respective sections for more +information. + +@subsection best-practices-mac Mac OS + +- [Best Practices for Working with Vertex Data](https://developer.apple.com/library/mac/#documentation/graphicsimaging/Conceptual/OpenGL-MacProgGuide/opengl_vertexdata/opengl_vertexdata.html) +- [Best Practices for Working with Texture Data](https://developer.apple.com/library/mac/#documentation/graphicsimaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/opengl_texturedata.html) + +@subsection best-practices-ios iOS + +- [Best Practices for Working with Vertex Data](http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html) +- [Best Practices for Working with Texture Data](http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesForWorkingWithTextureData/TechniquesForWorkingWithTextureData.html) +- [Best Practices for Shaders](http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/BestPracticesforShaders/BestPracticesforShaders.html#//apple_ref/doc/uid/TP40008793-CH7-SW3) + +@subsection best-practices-nacl Google Chrome Native Client + +- [Best practices for 3D graphics](https://developers.google.com/native-client/beta/devguide/coding/3D-graphics#best-practices) */ +} From c01c52224863ef91c6ba28831b53552b8e60bf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 16:54:22 +0100 Subject: [PATCH 02/10] Mention Native Client buffer requirements. Allow more convenient target hint setting. --- doc/best-practices.dox | 9 +++++++++ src/Buffer.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/best-practices.dox b/doc/best-practices.dox index 7883be334..2c06f6ce7 100644 --- a/doc/best-practices.dox +++ b/doc/best-practices.dox @@ -29,5 +29,14 @@ information. - [Best practices for 3D graphics](https://developers.google.com/native-client/beta/devguide/coding/3D-graphics#best-practices) +@subsubsection best-practices-nacl-buffer-types Native Client requires unique buffer binding + +As noted in the above link, buffers in NaCl implementation need to be bound +only to one unique target, i.e., Buffer bound to @ref Buffer::Target "Target::Array" +cannot be later rebound to @ref Buffer::Target "Target::Element". However, +%Magnum by default uses any sufficient target when binding the buffer +internally (e.g. for setting data or copying). To avoid this, set target hint +to desired target, either in constructor or using Buffer::setTargetHint(). + */ } diff --git a/src/Buffer.h b/src/Buffer.h index 7473543ff..ff7dcc1a4 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -305,11 +305,13 @@ class MAGNUM_EXPORT Buffer { /** * @brief Constructor + * @param targetHint Target hint, see setTargetHint() for more + * information * * Generates new OpenGL buffer. * @see @fn_gl{GenBuffers} */ - inline Buffer(): _targetHint(Target::Array) { + inline Buffer(Target targetHint = Target::Array): _targetHint(targetHint) { glGenBuffers(1, &_id); } From 2ad7fea174c78d08038ea4bdf1b502e37573ee98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 Nov 2012 01:52:06 +0100 Subject: [PATCH 03/10] Sdl2Application: support for modifiers also in mouse events. Lazily loaded on user request. --- src/Platform/Sdl2Application.cpp | 12 ++++++++++++ src/Platform/Sdl2Application.h | 22 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/Platform/Sdl2Application.cpp b/src/Platform/Sdl2Application.cpp index 00d40aca8..9ae19073f 100644 --- a/src/Platform/Sdl2Application.cpp +++ b/src/Platform/Sdl2Application.cpp @@ -135,4 +135,16 @@ int Sdl2Application::exec() { return 0; } +Sdl2Application::InputEvent::Modifiers Sdl2Application::MouseEvent::modifiers() { + if(modifiersLoaded) return _modifiers; + modifiersLoaded = true; + return _modifiers = static_cast(SDL_GetModState()); +} + +Sdl2Application::InputEvent::Modifiers Sdl2Application::MouseMoveEvent::modifiers() { + if(modifiersLoaded) return _modifiers; + modifiersLoaded = true; + return _modifiers = static_cast(SDL_GetModState()); +} + }} diff --git a/src/Platform/Sdl2Application.h b/src/Platform/Sdl2Application.h index 3984f41da..10e0e7713 100644 --- a/src/Platform/Sdl2Application.h +++ b/src/Platform/Sdl2Application.h @@ -343,11 +343,20 @@ class Sdl2Application::MouseEvent: public Sdl2Application::InputEvent { /** @brief Position */ inline Math::Vector2 position() const { return _position; } + /** + * @brief Modifiers + * + * Lazily populated on first request. + */ + Modifiers modifiers(); + private: - inline MouseEvent(Button button, const Math::Vector2& position): _button(button), _position(position) {} + inline MouseEvent(Button button, const Math::Vector2& position): _button(button), _position(position), modifiersLoaded(false) {} const Button _button; const Math::Vector2 _position; + bool modifiersLoaded; + Modifiers _modifiers; }; /** @@ -362,10 +371,19 @@ class Sdl2Application::MouseMoveEvent: public Sdl2Application::InputEvent { /** @brief Position */ inline Math::Vector2 position() const { return _position; } + /** + * @brief Modifiers + * + * Lazily populated on first request. + */ + Modifiers modifiers(); + private: - inline MouseMoveEvent(const Math::Vector2& position): _position(position) {} + inline MouseMoveEvent(const Math::Vector2& position): _position(position), modifiersLoaded(false) {} const Math::Vector2 _position; + bool modifiersLoaded; + Modifiers _modifiers; }; /** @hideinitializer From 5b16dbb55052f94c62531ac96d6c31ffc287ca8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 Nov 2012 11:49:21 +0100 Subject: [PATCH 04/10] Sdl2Application: support for relative position in mouse move event. --- src/Platform/Sdl2Application.cpp | 2 +- src/Platform/Sdl2Application.h | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Platform/Sdl2Application.cpp b/src/Platform/Sdl2Application.cpp index 9ae19073f..c5d030b20 100644 --- a/src/Platform/Sdl2Application.cpp +++ b/src/Platform/Sdl2Application.cpp @@ -117,7 +117,7 @@ int Sdl2Application::exec() { } break; case SDL_MOUSEMOTION: { - MouseMoveEvent e({event.motion.x, event.motion.y}); + MouseMoveEvent e({event.motion.x, event.motion.y}, {event.motion.xrel, event.motion.yrel}); mouseMoveEvent(e); break; } diff --git a/src/Platform/Sdl2Application.h b/src/Platform/Sdl2Application.h index 10e0e7713..bc416956a 100644 --- a/src/Platform/Sdl2Application.h +++ b/src/Platform/Sdl2Application.h @@ -371,6 +371,13 @@ class Sdl2Application::MouseMoveEvent: public Sdl2Application::InputEvent { /** @brief Position */ inline Math::Vector2 position() const { return _position; } + /** + * @brief Relative position + * + * Position relative to previous event + */ + inline Math::Vector2 relativePosition() const { return _relativePosition; } + /** * @brief Modifiers * @@ -379,9 +386,9 @@ class Sdl2Application::MouseMoveEvent: public Sdl2Application::InputEvent { Modifiers modifiers(); private: - inline MouseMoveEvent(const Math::Vector2& position): _position(position), modifiersLoaded(false) {} + inline MouseMoveEvent(const Math::Vector2& position, const Math::Vector2& relativePosition): _position(position), _relativePosition(relativePosition), modifiersLoaded(false) {} - const Math::Vector2 _position; + const Math::Vector2 _position, _relativePosition; bool modifiersLoaded; Modifiers _modifiers; }; From 858661fa7e0888eda1dbe1211c41212d92be3a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 Nov 2012 11:56:57 +0100 Subject: [PATCH 05/10] Sdl2Application: support for mouse locking. --- src/Platform/Sdl2Application.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Platform/Sdl2Application.h b/src/Platform/Sdl2Application.h index bc416956a..ba9e3a1fd 100644 --- a/src/Platform/Sdl2Application.h +++ b/src/Platform/Sdl2Application.h @@ -122,6 +122,22 @@ class Sdl2Application { /** @{ @name Mouse handling */ + /** @brief Whether mouse is locked */ + inline bool isMouseLocked() const { + return SDL_GetRelativeMouseMode(); + } + + /** + * @brief Enable or disable mouse locking + * + * When mouse is locked, the cursor is hidden and only + * MouseMoveEvent::relativePosition() is changing, absolute position + * stays the same. + */ + inline void setMouseLocked(bool enabled) { + SDL_SetRelativeMouseMode(enabled ? SDL_TRUE : SDL_FALSE); + } + /** * @brief Mouse press event * From 19a92f3ca79b3261a028b66272bb3e2478a1f472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 19:18:36 +0100 Subject: [PATCH 06/10] Forward declarations for Physics namespace in Physics/Physics.h. --- doc/compilation-speedup.dox | 1 + src/Physics/CMakeLists.txt | 5 +- src/Physics/Capsule.h | 4 +- src/Physics/DebugDrawResourceManager.h | 13 +---- src/Physics/ObjectShape.h | 3 - src/Physics/ObjectShapeGroup.h | 4 +- src/Physics/Physics.h | 76 ++++++++++++++++++++++++++ src/Physics/Plane.cpp | 2 +- src/Physics/Plane.h | 6 +- src/Physics/Sphere.h | 5 +- 10 files changed, 86 insertions(+), 33 deletions(-) create mode 100644 src/Physics/Physics.h diff --git a/doc/compilation-speedup.dox b/doc/compilation-speedup.dox index 13dfef0ee..d67a69c6b 100644 --- a/doc/compilation-speedup.dox +++ b/doc/compilation-speedup.dox @@ -20,6 +20,7 @@ typedefs etc. In this case a header with forward declarations is usually available, each namespace has its own: - Magnum.h + - Physics/Physics.h - SceneGraph/SceneGraph.h - Shaders/Shaders.h diff --git a/src/Physics/CMakeLists.txt b/src/Physics/CMakeLists.txt index f577e1594..c2b35ce8a 100644 --- a/src/Physics/CMakeLists.txt +++ b/src/Physics/CMakeLists.txt @@ -25,10 +25,11 @@ set(MagnumPhysics_HEADERS DebugDrawResourceManager.h Line.h LineSegment.h - Plane.h - Point.h ObjectShape.h ObjectShapeGroup.h + Physics.h + Plane.h + Point.h ShapeGroup.h Sphere.h diff --git a/src/Physics/Capsule.h b/src/Physics/Capsule.h index c493f1db9..af8a19a36 100644 --- a/src/Physics/Capsule.h +++ b/src/Physics/Capsule.h @@ -21,14 +21,12 @@ #include "Math/Vector3.h" #include "AbstractShape.h" +#include "Physics.h" #include "magnumCompatibility.h" namespace Magnum { namespace Physics { -template class Point; -template class Sphere; - /** @brief %Capsule defined by cylinder start and end point and radius diff --git a/src/Physics/DebugDrawResourceManager.h b/src/Physics/DebugDrawResourceManager.h index c8253dfbf..041e77134 100644 --- a/src/Physics/DebugDrawResourceManager.h +++ b/src/Physics/DebugDrawResourceManager.h @@ -28,15 +28,12 @@ #include "ResourceManager.h" #include "SceneGraph/SceneGraph.h" +#include "Physics.h" #include "magnumPhysicsVisibility.h" namespace Magnum { -class AbstractShaderProgram; -class Buffer; -class Mesh; - #ifndef DOXYGEN_GENERATING_OUTPUT namespace Physics { namespace Implementation { struct Options { @@ -50,14 +47,6 @@ extern template ResourceManager class AbstractShape; -typedef AbstractShape<2> AbstractShape2D; -typedef AbstractShape<3> AbstractShape3D; - -template class ObjectShape; -typedef ObjectShape<2> ObjectShape2D; -typedef ObjectShape<3> ObjectShape3D; - /** @brief %Resource manager for physics debug draw diff --git a/src/Physics/ObjectShape.h b/src/Physics/ObjectShape.h index 1a651a8ee..8a2d23d6a 100644 --- a/src/Physics/ObjectShape.h +++ b/src/Physics/ObjectShape.h @@ -26,9 +26,6 @@ namespace Magnum { namespace Physics { -template class ObjectShapeGroup; -template class AbstractShape; - /** @brief Object shape diff --git a/src/Physics/ObjectShapeGroup.h b/src/Physics/ObjectShapeGroup.h index 93eb61659..cca7d18c9 100644 --- a/src/Physics/ObjectShapeGroup.h +++ b/src/Physics/ObjectShapeGroup.h @@ -23,17 +23,15 @@ #include #include "SceneGraph/FeatureGroup.h" +#include "Physics.h" #include "magnumPhysicsVisibility.h" namespace Magnum { namespace Physics { -template class ObjectShape; - /** @brief Group of object shapes - @see ObjectShapeGroup2D, ObjectShapeGroup3D */ template class PHYSICS_EXPORT ObjectShapeGroup: public SceneGraph::FeatureGroup> { diff --git a/src/Physics/Physics.h b/src/Physics/Physics.h new file mode 100644 index 000000000..aca5325fe --- /dev/null +++ b/src/Physics/Physics.h @@ -0,0 +1,76 @@ +#ifndef Magnum_Physics_Physics_h +#define Magnum_Physics_Physics_h +/* + Copyright © 2010, 2011, 2012 Vladimír Vondruš + + This file is part of Magnum. + + Magnum is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 3 + only, as published by the Free Software Foundation. + + Magnum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License version 3 for more details. +*/ + +#include + +/** @file + * @brief Forward declarations for Magnum::Physics namespace + */ + +namespace Magnum { namespace Physics { + +template class AbstractShape; +typedef AbstractShape<2> AbstractShape2D; +typedef AbstractShape<3> AbstractShape3D; + +template class AxisAlignedBox; +typedef AxisAlignedBox<2> AxisAlignedBox2D; +typedef AxisAlignedBox<3> AxisAlignedBox3D; + +template class Box; +typedef Box<2> Box2D; +typedef Box<3> Box3D; + +template class Capsule; +typedef Capsule<2> Capsule2D; +typedef Capsule<3> Capsule3D; + +class DebugDrawResourceManager; + +template class Line; +typedef Line<2> Line2D; +typedef Line<3> Line3D; + +template class LineSegment; +typedef LineSegment<2> LineSegment2D; +typedef LineSegment<3> LineSegment3D; + +template class ObjectShape; +typedef ObjectShape<2> ObjectShape2D; +typedef ObjectShape<3> ObjectShape3D; + +template class ObjectShapeGroup; +typedef ObjectShapeGroup<2> ObjectShapeGroup2D; +typedef ObjectShapeGroup<3> ObjectShapeGroup3D; + +class Plane; + +template class Point; +typedef Point<2> Point2D; +typedef Point<3> Point3D; + +template class ShapeGroup; +typedef ShapeGroup<2> ShapeGroup2D; +typedef ShapeGroup<3> ShapeGroup3D; + +template class Sphere; +typedef Sphere<2> Sphere2D; +typedef Sphere<3> Sphere3D; + +}} + +#endif diff --git a/src/Physics/Plane.cpp b/src/Physics/Plane.cpp index b55c1d7a2..e1ddf5ac5 100644 --- a/src/Physics/Plane.cpp +++ b/src/Physics/Plane.cpp @@ -28,7 +28,7 @@ using namespace Magnum::Math::Geometry; namespace Magnum { namespace Physics { void Plane::applyTransformation(const Matrix4& transformation) { - _transformedPosition = (transformation*Point3D(_position)).xyz(); + _transformedPosition = (transformation*Magnum::Point3D(_position)).xyz(); _transformedNormal = transformation.rotation()*_normal; } diff --git a/src/Physics/Plane.h b/src/Physics/Plane.h index c17114b16..2397aa2e2 100644 --- a/src/Physics/Plane.h +++ b/src/Physics/Plane.h @@ -21,16 +21,12 @@ #include "Math/Vector3.h" #include "AbstractShape.h" +#include "Physics.h" #include "magnumCompatibility.h" namespace Magnum { namespace Physics { -template class Line; -typedef Line<3> Line3D; -template class LineSegment; -typedef LineSegment<3> LineSegment3D; - /** @brief Infinite plane, defined by position and normal (3D only) */ class PHYSICS_EXPORT Plane: public AbstractShape<3> { public: diff --git a/src/Physics/Sphere.h b/src/Physics/Sphere.h index 9a91966ca..1fd8cc378 100644 --- a/src/Physics/Sphere.h +++ b/src/Physics/Sphere.h @@ -21,15 +21,12 @@ #include "Math/Vector3.h" #include "AbstractShape.h" +#include "Physics.h" #include "magnumCompatibility.h" namespace Magnum { namespace Physics { -template class Line; -template class LineSegment; -template class Point; - /** @brief %Sphere defined by position and radius From d2cd358495af43b0363a7dbbfb71d44b9228e885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 19:27:41 +0100 Subject: [PATCH 07/10] Forward declarations for enums in SceneGraph. --- src/SceneGraph/AbstractCamera.h | 2 +- src/SceneGraph/SceneGraph.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SceneGraph/AbstractCamera.h b/src/SceneGraph/AbstractCamera.h index 64707a78e..0b538d672 100644 --- a/src/SceneGraph/AbstractCamera.h +++ b/src/SceneGraph/AbstractCamera.h @@ -32,7 +32,7 @@ namespace Magnum { namespace SceneGraph { @see AbstractCamera::setAspectRatioPolicy() */ -enum class AspectRatioPolicy { +enum class AspectRatioPolicy: std::uint8_t { NotPreserved, /**< Don't preserve aspect ratio (default) */ Extend, /**< Extend on larger side of view */ Clip /**< Clip on smaller side of view */ diff --git a/src/SceneGraph/SceneGraph.h b/src/SceneGraph/SceneGraph.h index 1f0845df0..d6a5337f0 100644 --- a/src/SceneGraph/SceneGraph.h +++ b/src/SceneGraph/SceneGraph.h @@ -25,6 +25,8 @@ namespace Magnum { namespace SceneGraph { +enum class AspectRatioPolicy: std::uint8_t; + template class AbstractCamera; #ifndef MAGNUM_GCC46_COMPATIBILITY template using AbstractCamera2D = AbstractCamera<2, T>; @@ -49,6 +51,8 @@ template using AbstractObject2D = AbstractObject<2, T>; template using AbstractObject3D = AbstractObject<3, T>; #endif +enum class TransformationType: std::uint8_t; + template class AbstractTransformation; #ifndef MAGNUM_GCC46_COMPATIBILITY template using AbstractTransformation2D = AbstractTransformation<2, T>; From 03e6c9859c4d2ab66377aaf48dbf84456938e4e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 19:28:29 +0100 Subject: [PATCH 08/10] Mention forward declarations and headers in coding style. --- doc/coding-style.dox | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/coding-style.dox b/doc/coding-style.dox index 74ea08d2b..81c6a7a10 100644 --- a/doc/coding-style.dox +++ b/doc/coding-style.dox @@ -29,6 +29,15 @@ When writing wrappers for OpenGL functions and defines, try to match the original name as closely as possible, although expanding abbrevations (and removing redundant prefixes) is encouraged. +@subsubsection cpp-forward-declarations Forward declarations and forward declaration headers + +Use forward declarations in headers as much as possible, as it can +significantly reduce time of incremental compilation. When an namespace has +classes which are commonly forward-declared, consider making a forward +declaration header - it should have the same name as the namespace itself and +contain foward declarations for all classes, enums and copies of all +meaningful typedefs. See SceneGraph/SceneGraph.h for an example. + @section documentation Doxygen documentation @subsection documentation-commands Special documentation commands From 6f492de8e3d02a5107f88ff85dc8688ca5676ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 21:22:16 +0100 Subject: [PATCH 09/10] Physics: work around cyclic dependency of ObjectShape.h and OSGroup.h. --- src/Physics/ObjectShapeGroup.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Physics/ObjectShapeGroup.h b/src/Physics/ObjectShapeGroup.h index cca7d18c9..e05233434 100644 --- a/src/Physics/ObjectShapeGroup.h +++ b/src/Physics/ObjectShapeGroup.h @@ -82,4 +82,7 @@ typedef ObjectShapeGroup<3> ObjectShapeGroup3D; }} +/* Make the definition complete */ +#include "ObjectShape.h" + #endif From a7eff451d46bb2f0513004e3b0ddc5f7b9f51f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Nov 2012 21:22:51 +0100 Subject: [PATCH 10/10] Added missing include. Curious why it was unnoticed until now. --- src/SceneGraph/AbstractObject.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SceneGraph/AbstractObject.h b/src/SceneGraph/AbstractObject.h index e896314ec..695ee1efe 100644 --- a/src/SceneGraph/AbstractObject.h +++ b/src/SceneGraph/AbstractObject.h @@ -19,6 +19,7 @@ * @brief Class Magnum::SceneGraph::AbstractObject, alias Magnum::SceneGraph::AbstractObject2D, Magnum::SceneGraph::AbstractObject3D */ +#include #include #include "DimensionTraits.h"