diff --git a/CMakeLists.txt b/CMakeLists.txt index e3673f730..a9222b42f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,8 +4,6 @@ project(Magnum) include(CMakeDependentOption) -option(GCC46_COMPATIBILITY "Enable compatibility mode for GCC 4.6 (might disable some features)" OFF) - option(TARGET_GLES "Build for OpenGL ES instead of desktop OpenGL" OFF) cmake_dependent_option(TARGET_GLES2 "Build for OpenGL ES 2" ON "TARGET_GLES" OFF) @@ -64,13 +62,6 @@ if(TARGET_GLES2) set(MAGNUM_TARGET_GLES2 1) endif() -if(CORRADE_GCC45_COMPATIBILITY) - set(GCC46_COMPATIBILITY 1) -endif() -if(GCC46_COMPATIBILITY) - set(MAGNUM_GCC46_COMPATIBILITY 1) -endif() - # Installation paths set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) set(MAGNUM_CMAKE_MODULE_INSTALL_DIR ${CMAKE_ROOT}/Modules) diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake index 6009f5359..b1362cbd4 100644 --- a/modules/FindCorrade.cmake +++ b/modules/FindCorrade.cmake @@ -5,10 +5,20 @@ # This module tries to find Corrade library and then defines: # CORRADE_FOUND - True if Corrade library is found # CORRADE_INCLUDE_DIR - Include dir for Corrade -# CORRADE_LIBRARIES - All Corrade libraries -# CORRADE_UTILITY_LIBRARY - Corrade Utility library -# CORRADE_PLUGINMANAGER_LIBRARY - Corrade Plugin manager library +# CORRADE_UTILITY_LIBRARIES - Corrade Utility library and dependent +# libraries +# CORRADE_PLUGINMANAGER_LIBRARIES - Corrade Plugin manager library and +# dependent libraries +# CORRADE_TESTSUITE_LIBRARIES - Corrade TestSuite library and dependent +# libraries # CORRADE_RC_EXECUTABLE - Corrade resource compiler executable +# Additionally these variables are defined for internal usage: +# CORRADE_UTILITY_LIBRARY - Corrade Utility library (w/o +# dependencies) +# CORRADE_PLUGINMANAGER_LIBRARY - Corrade Plugin manager library (w/o +# dependencies) +# CORRADE_TESTSUITE_LIBRARY - Corrade TestSuite library (w/o +# dependencies) # If Corrade library is found, these macros and functions are defined: # # @@ -17,8 +27,9 @@ # sources... # [LIBRARIES libraries...]) # Test name is also executable name. You can also specify libraries to link -# with instead of using target_link_libraries(). Note that the -# enable_testing() must be called explicitly. +# with instead of using target_link_libraries(). CORRADE_TESTSUITE_LIBRARIES +# are linked atuomatically to each test. Note that the enable_testing() +# function must be called explicitly. # # # Add QtTest unit test. @@ -98,6 +109,7 @@ # Libraries find_library(CORRADE_UTILITY_LIBRARY CorradeUtility) find_library(CORRADE_PLUGINMANAGER_LIBRARY CorradePluginManager) +find_library(CORRADE_TESTSUITE_LIBRARY CorradeTestSuite) # RC executable find_program(CORRADE_RC_EXECUTABLE corrade-rc) @@ -111,6 +123,7 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Corrade DEFAULT_MSG CORRADE_UTILITY_LIBRARY CORRADE_PLUGINMANAGER_LIBRARY + CORRADE_TESTSUITE_LIBRARY CORRADE_INCLUDE_DIR CORRADE_RC_EXECUTABLE) @@ -130,7 +143,15 @@ string(FIND "${_corradeConfigure}" "#define CORRADE_GCC45_COMPATIBILITY" _GCC45_ if(NOT _GCC45_COMPATIBILITY EQUAL -1) set(CORRADE_GCC45_COMPATIBILITY 1) endif() +string(FIND "${_corradeConfigure}" "#define CORRADE_GCC46_COMPATIBILITY" _GCC46_COMPATIBILITY) +if(NOT _GCC46_COMPATIBILITY EQUAL -1) + set(CORRADE_GCC46_COMPATIBILITY 1) +endif() + +set(CORRADE_UTILITY_LIBRARIES ${CORRADE_UTILITY_LIBRARY}) +set(CORRADE_PLUGINMANAGER_LIBRARIES ${CORRADE_PLUGINMANAGER_LIBRARY} ${CORRADE_UTILITY_LIBRARIES}) +set(CORRADE_TESTSUITE_LIBRARIES ${CORRADE_TESTSUITE_LIBRARY} ${CORRADE_UTILITY_LIBRARIES}) +mark_as_advanced(CORRADE_UTILITY_LIBRARY CORRADE_PLUGINMANAGER_LIBRARY CORRADE_TESTSUITE_LIBRARY) include(CorradeMacros) include(CorradeLibSuffix) -set(CORRADE_LIBRARIES ${CORRADE_UTILITY_LIBRARY} ${CORRADE_PLUGINMANAGER_LIBRARY}) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index 951afd188..52d1bd474 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -67,12 +67,6 @@ find_path(MAGNUM_INCLUDE_DIR # Configuration file(READ ${MAGNUM_INCLUDE_DIR}/magnumConfigure.h _magnumConfigure) -# Compatibility? -string(FIND "${_magnumConfigure}" "#define MAGNUM_GCC46_COMPATIBILITY" _GCC46_COMPATIBILITY) -if(NOT _GCC46_COMPATIBILITY EQUAL -1) - set(MAGNUM_GCC46_COMPATIBILITY 1) -endif() - # Built for specific target? string(FIND "${_magnumConfigure}" "#define MAGNUM_TARGET_GLES" _TARGET_GLES) if(NOT _TARGET_GLES EQUAL -1) @@ -190,16 +184,17 @@ foreach(component ${Magnum_FIND_COMPONENTS}) find_path(_MAGNUM_${_COMPONENT}_INCLUDE_DIR NAMES ${_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES} PATHS ${MAGNUM_INCLUDE_DIR}/${_MAGNUM_${_COMPONENT}_INCLUDE_PATH_SUFFIX}) - - # Don't expose this variable to end users - mark_as_advanced(FORCE _MAGNUM_${_COMPONENT}_INCLUDE_DIR) endif() # Decide if the library was found if(MAGNUM_${_COMPONENT}_LIBRARY AND _MAGNUM_${_COMPONENT}_INCLUDE_DIR) set(MAGNUM_${_COMPONENT}_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARY} ${_MAGNUM_${_COMPONENT}_LIBRARIES}) set(MAGNUM_${_COMPONENT}_INCLUDE_DIRS ${_MAGNUM_${_COMPONENT}_INCLUDE_DIRS}) + set(Magnum_${component}_FOUND TRUE) + + # Don't expose variables w/o dependencies to end users + mark_as_advanced(FORCE MAGNUM_${_COMPONENT}_LIBRARY _MAGNUM_${_COMPONENT}_INCLUDE_DIR) else() set(Magnum_${component}_FOUND FALSE) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3c1fef6ec..7e06f1f2f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -87,7 +87,6 @@ set(Magnum_HEADERS Timeline.h TypeTraits.h - magnumCompatibility.h magnumVisibility.h) # Desktop-only headers diff --git a/src/Context.cpp b/src/Context.cpp index 4b8ad07ef..a47c68915 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "AbstractShaderProgram.h" #include "AbstractTexture.h" @@ -255,7 +255,7 @@ Context::Context() { /* Don't crash when glGetString() returns nullptr */ const char* e = reinterpret_cast(glGetString(GL_EXTENSIONS)); if(e) { - vector extensions = Corrade::Utility::split(e, ' '); + vector extensions = Corrade::Utility::String::split(e, ' '); for(auto it = extensions.begin(); it != extensions.end(); ++it) { auto found = futureExtensions.find(*it); if(found != futureExtensions.end()) { diff --git a/src/IndexedMesh.h b/src/IndexedMesh.h index bac40636e..0d5bfd045 100644 --- a/src/IndexedMesh.h +++ b/src/IndexedMesh.h @@ -21,6 +21,8 @@ #include "Mesh.h" +#include "corradeCompatibility.h" + namespace Magnum { /** diff --git a/src/Magnum.h b/src/Magnum.h index 18458f416..90263b281 100644 --- a/src/Magnum.h +++ b/src/Magnum.h @@ -21,7 +21,7 @@ #include -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" #include "magnumConfigure.h" #ifndef MAGNUM_TARGET_GLES diff --git a/src/Math/Math.h b/src/Math/Math.h index a3dc2d04d..d3fd2c387 100644 --- a/src/Math/Math.h +++ b/src/Math/Math.h @@ -21,7 +21,7 @@ #include #include -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" #include "magnumVisibility.h" /** @file diff --git a/src/Math/MathTypeTraits.h b/src/Math/MathTypeTraits.h index 1301b6685..364fc2648 100644 --- a/src/Math/MathTypeTraits.h +++ b/src/Math/MathTypeTraits.h @@ -23,7 +23,7 @@ #include #include -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" /** @brief Precision when testing floats for equality */ #ifndef FLOAT_EQUALITY_PRECISION diff --git a/src/Math/Test/Matrix4Test.cpp b/src/Math/Test/Matrix4Test.cpp index a1e8c4cbc..7ecac7095 100644 --- a/src/Math/Test/Matrix4Test.cpp +++ b/src/Math/Test/Matrix4Test.cpp @@ -160,9 +160,13 @@ void Matrix4Test::rotationPart() { ); Matrix4 rotation = Matrix4::rotation(deg(-74.0f), Vector3(-1.0f, 2.0f, 2.0f).normalized()); + CORRADE_COMPARE(rotation.rotation().determinant(), 1.0f); + CORRADE_COMPARE(rotation.rotation()*rotation.rotation().transposed(), Matrix3()); CORRADE_COMPARE(rotation.rotation(), expectedRotationPart); Matrix4 rotationTransformed = Matrix4::translation({2.0f, 5.0f, -3.0f})*rotation*Matrix4::scaling(Vector3(9.0f)); + CORRADE_COMPARE(rotationTransformed.rotation().determinant(), 1.0f); + CORRADE_COMPARE(rotationTransformed.rotation()*rotationTransformed.rotation().transposed(), Matrix3()); CORRADE_COMPARE(rotationTransformed.rotation(), expectedRotationPart); } diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 351e58bd2..a11fcbd4a 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -111,7 +111,7 @@ void Mesh::bindVAO(GLuint vao) { } void Mesh::bind() { - CORRADE_ASSERT((_vertexCount == 0) == attributes.empty(), "Mesh: vertex count is non-zero, but no attributes are bound", ); + CORRADE_ASSERT((_vertexCount != 0) || !attributes.empty(), "Mesh: attributes are bound but vertex count is zero", ); (this->*bindImplementation)(); } diff --git a/src/Mesh.h b/src/Mesh.h index 8a1b9385f..4f78a4fcc 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -404,8 +404,9 @@ class MAGNUM_EXPORT Mesh { * * Default is zero. * @attention All bound attributes are reset after calling this - * function, so you must call - * addVertexBuffer()/addInterleavedVertexBuffer() afterwards. + * function, so if your mesh has any vertex attributes, be sure + * to call addVertexBuffer()/addInterleavedVertexBuffer() + * afterwards. * @see MeshTools::interleave() */ Mesh* setVertexCount(GLsizei vertexCount); diff --git a/src/Physics/AxisAlignedBox.h b/src/Physics/AxisAlignedBox.h index b94a1c70e..15f96d1c3 100644 --- a/src/Physics/AxisAlignedBox.h +++ b/src/Physics/AxisAlignedBox.h @@ -22,7 +22,7 @@ #include "Math/Vector3.h" #include "AbstractShape.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/Box.h b/src/Physics/Box.h index 828f9e2af..272236540 100644 --- a/src/Physics/Box.h +++ b/src/Physics/Box.h @@ -23,7 +23,7 @@ #include "Math/Matrix4.h" #include "AbstractShape.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/Capsule.h b/src/Physics/Capsule.h index f279985de..e2ff9da69 100644 --- a/src/Physics/Capsule.h +++ b/src/Physics/Capsule.h @@ -23,7 +23,7 @@ #include "AbstractShape.h" #include "Physics.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/Implementation/AbstractBoxRenderer.h b/src/Physics/Implementation/AbstractBoxRenderer.h index 87c57687e..2c7bcea28 100644 --- a/src/Physics/Implementation/AbstractBoxRenderer.h +++ b/src/Physics/Implementation/AbstractBoxRenderer.h @@ -17,13 +17,9 @@ #include "AbstractDebugRenderer.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" -namespace Magnum { - -class Buffer; - -namespace Physics { namespace Implementation { +namespace Magnum { namespace Physics { namespace Implementation { template class AbstractBoxRenderer: public AbstractDebugRenderer { public: diff --git a/src/Physics/Implementation/AbstractDebugRenderer.h b/src/Physics/Implementation/AbstractDebugRenderer.h index 3d699899b..04e7a8a6b 100644 --- a/src/Physics/Implementation/AbstractDebugRenderer.h +++ b/src/Physics/Implementation/AbstractDebugRenderer.h @@ -18,17 +18,9 @@ #include "DimensionTraits.h" #include "ResourceManager.h" #include "SceneGraph/SceneGraph.h" +#include "Shaders/Shaders.h" -namespace Magnum { - -class AbstractShaderProgram; -class Mesh; - -namespace Shaders { - template class FlatShader; -} - -namespace Physics { namespace Implementation { +namespace Magnum { namespace Physics { namespace Implementation { struct Options; diff --git a/src/Physics/Implementation/AxisAlignedBoxRenderer.h b/src/Physics/Implementation/AxisAlignedBoxRenderer.h index 5ee7062ec..7eae09acf 100644 --- a/src/Physics/Implementation/AxisAlignedBoxRenderer.h +++ b/src/Physics/Implementation/AxisAlignedBoxRenderer.h @@ -19,7 +19,7 @@ #include "Physics/AxisAlignedBox.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { namespace Implementation { diff --git a/src/Physics/Implementation/BoxRenderer.h b/src/Physics/Implementation/BoxRenderer.h index 4513155c1..ef67869fd 100644 --- a/src/Physics/Implementation/BoxRenderer.h +++ b/src/Physics/Implementation/BoxRenderer.h @@ -19,7 +19,7 @@ #include "Physics/Box.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { namespace Implementation { diff --git a/src/Physics/Line.h b/src/Physics/Line.h index 9246133a4..9230be376 100644 --- a/src/Physics/Line.h +++ b/src/Physics/Line.h @@ -22,7 +22,7 @@ #include "Math/Vector3.h" #include "AbstractShape.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/Plane.h b/src/Physics/Plane.h index 4a622ec58..07cc7ad68 100644 --- a/src/Physics/Plane.h +++ b/src/Physics/Plane.h @@ -23,7 +23,7 @@ #include "AbstractShape.h" #include "Physics.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/Point.h b/src/Physics/Point.h index 5c8e48574..741874ad6 100644 --- a/src/Physics/Point.h +++ b/src/Physics/Point.h @@ -22,7 +22,7 @@ #include "Math/Vector3.h" #include "AbstractShape.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/ShapeGroup.h b/src/Physics/ShapeGroup.h index 88fd7bd1b..d1ed8bce6 100644 --- a/src/Physics/ShapeGroup.h +++ b/src/Physics/ShapeGroup.h @@ -24,7 +24,7 @@ #include #include -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Physics/Sphere.h b/src/Physics/Sphere.h index 083fea64e..24b4dd074 100644 --- a/src/Physics/Sphere.h +++ b/src/Physics/Sphere.h @@ -23,7 +23,7 @@ #include "AbstractShape.h" #include "Physics.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Physics { diff --git a/src/Platform/AbstractXApplication.h b/src/Platform/AbstractXApplication.h index aef67aef4..783f7c479 100644 --- a/src/Platform/AbstractXApplication.h +++ b/src/Platform/AbstractXApplication.h @@ -32,8 +32,6 @@ #include "Math/Vector2.h" #include "AbstractContextHandler.h" -#include "magnumCompatibility.h" - namespace Magnum { class Context; diff --git a/src/Platform/EglContextHandler.h b/src/Platform/EglContextHandler.h index 1198695d0..878e5d3ab 100644 --- a/src/Platform/EglContextHandler.h +++ b/src/Platform/EglContextHandler.h @@ -31,7 +31,7 @@ #include "AbstractContextHandler.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Platform { diff --git a/src/Platform/GlutApplication.h b/src/Platform/GlutApplication.h index d476ebcc6..07e5c4572 100644 --- a/src/Platform/GlutApplication.h +++ b/src/Platform/GlutApplication.h @@ -26,8 +26,6 @@ #include -#include "magnumCompatibility.h" - namespace Magnum { class Context; diff --git a/src/Platform/GlxContextHandler.h b/src/Platform/GlxContextHandler.h index e59eb8083..8922f9bf5 100644 --- a/src/Platform/GlxContextHandler.h +++ b/src/Platform/GlxContextHandler.h @@ -27,7 +27,7 @@ #include "AbstractContextHandler.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace Magnum { namespace Platform { diff --git a/src/Platform/NaClApplication.h b/src/Platform/NaClApplication.h index 7a32d68cf..aabdb6c9a 100644 --- a/src/Platform/NaClApplication.h +++ b/src/Platform/NaClApplication.h @@ -31,7 +31,7 @@ #include "Math/Vector2.h" #include "Magnum.h" -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" namespace pp { class Graphics3D; diff --git a/src/Platform/Sdl2Application.h b/src/Platform/Sdl2Application.h index ab3eb217d..c7b634d31 100644 --- a/src/Platform/Sdl2Application.h +++ b/src/Platform/Sdl2Application.h @@ -26,8 +26,6 @@ #include #include -#include "magnumCompatibility.h" - namespace Magnum { class Context; diff --git a/src/Profiler.h b/src/Profiler.h index ff38ee583..e67c04ad5 100644 --- a/src/Profiler.h +++ b/src/Profiler.h @@ -24,7 +24,7 @@ #include #include -#include "magnumCompatibility.h" +#include "corradeCompatibility.h" #include "magnumVisibility.h" namespace Magnum { diff --git a/src/SceneGraph/AbstractCamera.h b/src/SceneGraph/AbstractCamera.h index e5a3793f6..8af0eec73 100644 --- a/src/SceneGraph/AbstractCamera.h +++ b/src/SceneGraph/AbstractCamera.h @@ -173,7 +173,7 @@ for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractCamera2D = AbstractCamera<2, T>; #endif #else @@ -190,7 +190,7 @@ for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractCamera3D = AbstractCamera<3, T>; #endif #else diff --git a/src/SceneGraph/AbstractFeature.h b/src/SceneGraph/AbstractFeature.h index 9e29b77a6..4506c2d4f 100644 --- a/src/SceneGraph/AbstractFeature.h +++ b/src/SceneGraph/AbstractFeature.h @@ -294,7 +294,7 @@ for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractFeature2D = AbstractFeature<2, T>; #endif #else @@ -311,7 +311,7 @@ for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractFeature3D = AbstractFeature<3, T>; #endif #else diff --git a/src/SceneGraph/AbstractGroupedFeature.h b/src/SceneGraph/AbstractGroupedFeature.h index c88379183..ffe33b1be 100644 --- a/src/SceneGraph/AbstractGroupedFeature.h +++ b/src/SceneGraph/AbstractGroupedFeature.h @@ -103,7 +103,7 @@ AbstractGroupedFeature for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractGroupedFeature2D = AbstractGroupedFeature<2, Derived, T>; #endif #else @@ -121,7 +121,7 @@ AbstractGroupedFeature for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>; #endif #else diff --git a/src/SceneGraph/AbstractObject.h b/src/SceneGraph/AbstractObject.h index 695ee1efe..08f9a4ac5 100644 --- a/src/SceneGraph/AbstractObject.h +++ b/src/SceneGraph/AbstractObject.h @@ -25,8 +25,6 @@ #include "DimensionTraits.h" #include "SceneGraph.h" -#include "magnumCompatibility.h" - namespace Magnum { namespace SceneGraph { /** @@ -190,7 +188,7 @@ for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractObject2D = AbstractObject<2, T>; #endif #else @@ -207,7 +205,7 @@ for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractObject3D = AbstractObject<3, T>; #endif #else diff --git a/src/SceneGraph/AbstractTransformation.h b/src/SceneGraph/AbstractTransformation.h index 31dc26409..718d6c09f 100644 --- a/src/SceneGraph/AbstractTransformation.h +++ b/src/SceneGraph/AbstractTransformation.h @@ -149,7 +149,7 @@ AbstractTransformation for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractTransformation2D = AbstractTransformation<2, T>; #endif #else @@ -167,7 +167,7 @@ AbstractTransformation for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractTransformation3D = AbstractTransformation<3, T>; #endif #else diff --git a/src/SceneGraph/Drawable.h b/src/SceneGraph/Drawable.h index 983d48716..9eaca737b 100644 --- a/src/SceneGraph/Drawable.h +++ b/src/SceneGraph/Drawable.h @@ -108,7 +108,7 @@ information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using Drawable2D = Drawable<2, T>; #endif #else @@ -125,7 +125,7 @@ information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using Drawable3D = Drawable<3, T>; #endif #else @@ -139,7 +139,7 @@ See Drawable for more information. @see DrawableGroup2D, DrawableGroup3D @todoc Remove workaround when Doxygen supports alias template */ -#if !defined(MAGNUM_GCC46_COMPATIBILITY) && !defined(DOXYGEN_GENERATING_OUTPUT) +#if !defined(CORRADE_GCC46_COMPATIBILITY) && !defined(DOXYGEN_GENERATING_OUTPUT) template using DrawableGroup = FeatureGroup, T>; #else #ifndef DOXYGEN_GENERATING_OUTPUT @@ -160,7 +160,7 @@ more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using DrawableGroup2D = DrawableGroup<2, T>; #endif #else @@ -177,7 +177,7 @@ more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using DrawableGroup3D = DrawableGroup<3, T>; #endif #else diff --git a/src/SceneGraph/FeatureGroup.h b/src/SceneGraph/FeatureGroup.h index 279be4dcf..07d62da23 100644 --- a/src/SceneGraph/FeatureGroup.h +++ b/src/SceneGraph/FeatureGroup.h @@ -119,7 +119,7 @@ AbstractGroupedFeature for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using FeatureGroup2D = FeatureGroup<2, Feature, T>; #endif #else @@ -137,7 +137,7 @@ AbstractGroupedFeature for more information. @todoc Remove workaround when Doxygen supports alias template */ #ifndef DOXYGEN_GENERATING_OUTPUT -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using FeatureGroup3D = FeatureGroup<3, Feature, T>; #endif #else diff --git a/src/SceneGraph/SceneGraph.h b/src/SceneGraph/SceneGraph.h index 895ae3215..4d77c55a8 100644 --- a/src/SceneGraph/SceneGraph.h +++ b/src/SceneGraph/SceneGraph.h @@ -23,6 +23,8 @@ #include "Magnum.h" +#include "corradeCompatibility.h" + namespace Magnum { namespace SceneGraph { #ifndef CORRADE_GCC45_COMPATIBILITY @@ -30,25 +32,25 @@ enum class AspectRatioPolicy: std::uint8_t; #endif template class AbstractCamera; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractCamera2D = AbstractCamera<2, T>; template using AbstractCamera3D = AbstractCamera<3, T>; #endif template class AbstractFeature; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractFeature2D = AbstractFeature<2, T>; template using AbstractFeature3D = AbstractFeature<3, T>; #endif template class AbstractGroupedFeature; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractGroupedFeature2D = AbstractGroupedFeature<2, Derived, T>; template using AbstractGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>; #endif template class AbstractObject; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractObject2D = AbstractObject<2, T>; template using AbstractObject3D = AbstractObject<3, T>; #endif @@ -58,7 +60,7 @@ enum class TransformationType: std::uint8_t; #endif template class AbstractTransformation; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractTransformation2D = AbstractTransformation<2, T>; template using AbstractTransformation3D = AbstractTransformation<3, T>; #endif @@ -72,18 +74,18 @@ template class Camera2D; template class Camera3D; template class Drawable; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using Drawable2D = Drawable<2, T>; template using Drawable3D = Drawable<3, T>; #endif template class FeatureGroup; -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using FeatureGroup2D = FeatureGroup<2, Feature, T>; template using FeatureGroup3D = FeatureGroup<3, Feature, T>; #endif -#ifndef MAGNUM_GCC46_COMPATIBILITY +#ifndef CORRADE_GCC46_COMPATIBILITY template using DrawableGroup = FeatureGroup, T>; template using DrawableGroup2D = DrawableGroup<2, T>; template using DrawableGroup3D = DrawableGroup<3, T>; diff --git a/src/Test/ResourceManagerTest.cpp b/src/Test/ResourceManagerTest.cpp index 9b87ea360..bd73a6b5b 100644 --- a/src/Test/ResourceManagerTest.cpp +++ b/src/Test/ResourceManagerTest.cpp @@ -20,6 +20,8 @@ #include "AbstractResourceLoader.h" #include "ResourceManager.h" +#include "corradeCompatibility.h" + using namespace std; using namespace Corrade::Utility; diff --git a/src/magnumCompatibility.h b/src/magnumCompatibility.h deleted file mode 100644 index bd81d0bb4..000000000 --- a/src/magnumCompatibility.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef magnumCompatibility_h -#define magnumCompatibility_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 "corradeCompatibility.h" -#include "magnumConfigure.h" - -#ifdef MAGNUM_GCC46_COMPATIBILITY -#define override -#endif - -#endif diff --git a/src/magnumConfigure.h.cmake b/src/magnumConfigure.h.cmake index 3296b3c10..5738c3961 100644 --- a/src/magnumConfigure.h.cmake +++ b/src/magnumConfigure.h.cmake @@ -1,4 +1,3 @@ #cmakedefine MAGNUM_TARGET_NACL #cmakedefine MAGNUM_TARGET_GLES #cmakedefine MAGNUM_TARGET_GLES2 -#cmakedefine MAGNUM_GCC46_COMPATIBILITY