Browse Source

Merge branch 'master' into compatibility

Conflicts:
	CMakeLists.txt
	modules/FindCorrade.cmake
	src/Context.cpp
	src/Magnum.h
	src/magnumCompatibility.h
Vladimír Vondruš 14 years ago
parent
commit
029a480e16
  1. 9
      CMakeLists.txt
  2. 33
      modules/FindCorrade.cmake
  3. 13
      modules/FindMagnum.cmake
  4. 1
      src/CMakeLists.txt
  5. 4
      src/Context.cpp
  6. 2
      src/IndexedMesh.h
  7. 2
      src/Magnum.h
  8. 2
      src/Math/Math.h
  9. 2
      src/Math/MathTypeTraits.h
  10. 4
      src/Math/Test/Matrix4Test.cpp
  11. 2
      src/Mesh.cpp
  12. 5
      src/Mesh.h
  13. 2
      src/Physics/AxisAlignedBox.h
  14. 2
      src/Physics/Box.h
  15. 2
      src/Physics/Capsule.h
  16. 8
      src/Physics/Implementation/AbstractBoxRenderer.h
  17. 12
      src/Physics/Implementation/AbstractDebugRenderer.h
  18. 2
      src/Physics/Implementation/AxisAlignedBoxRenderer.h
  19. 2
      src/Physics/Implementation/BoxRenderer.h
  20. 2
      src/Physics/Line.h
  21. 2
      src/Physics/Plane.h
  22. 2
      src/Physics/Point.h
  23. 2
      src/Physics/ShapeGroup.h
  24. 2
      src/Physics/Sphere.h
  25. 2
      src/Platform/AbstractXApplication.h
  26. 2
      src/Platform/EglContextHandler.h
  27. 2
      src/Platform/GlutApplication.h
  28. 2
      src/Platform/GlxContextHandler.h
  29. 2
      src/Platform/NaClApplication.h
  30. 2
      src/Platform/Sdl2Application.h
  31. 2
      src/Profiler.h
  32. 4
      src/SceneGraph/AbstractCamera.h
  33. 4
      src/SceneGraph/AbstractFeature.h
  34. 4
      src/SceneGraph/AbstractGroupedFeature.h
  35. 6
      src/SceneGraph/AbstractObject.h
  36. 4
      src/SceneGraph/AbstractTransformation.h
  37. 10
      src/SceneGraph/Drawable.h
  38. 4
      src/SceneGraph/FeatureGroup.h
  39. 18
      src/SceneGraph/SceneGraph.h
  40. 2
      src/Test/ResourceManagerTest.cpp
  41. 25
      src/magnumCompatibility.h
  42. 1
      src/magnumConfigure.h.cmake

9
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)

33
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})

13
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()

1
src/CMakeLists.txt

@ -87,7 +87,6 @@ set(Magnum_HEADERS
Timeline.h
TypeTraits.h
magnumCompatibility.h
magnumVisibility.h)
# Desktop-only headers

4
src/Context.cpp

@ -18,7 +18,7 @@
#include <string>
#include <unordered_map>
#include <Utility/Debug.h>
#include <Utility/utilities.h>
#include <Utility/String.h>
#include "AbstractShaderProgram.h"
#include "AbstractTexture.h"
@ -255,7 +255,7 @@ Context::Context() {
/* Don't crash when glGetString() returns nullptr */
const char* e = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
if(e) {
vector<string> extensions = Corrade::Utility::split(e, ' ');
vector<string> extensions = Corrade::Utility::String::split(e, ' ');
for(auto it = extensions.begin(); it != extensions.end(); ++it) {
auto found = futureExtensions.find(*it);
if(found != futureExtensions.end()) {

2
src/IndexedMesh.h

@ -21,6 +21,8 @@
#include "Mesh.h"
#include "corradeCompatibility.h"
namespace Magnum {
/**

2
src/Magnum.h

@ -21,7 +21,7 @@
#include <cstdint>
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
#include "magnumConfigure.h"
#ifndef MAGNUM_TARGET_GLES

2
src/Math/Math.h

@ -21,7 +21,7 @@
#include <limits>
#include <algorithm>
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
#include "magnumVisibility.h"
/** @file

2
src/Math/MathTypeTraits.h

@ -23,7 +23,7 @@
#include <cstdint>
#include <cmath>
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
/** @brief Precision when testing floats for equality */
#ifndef FLOAT_EQUALITY_PRECISION

4
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);
}

2
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)();
}

5
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);

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

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

2
src/Physics/Capsule.h

@ -23,7 +23,7 @@
#include "AbstractShape.h"
#include "Physics.h"
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
namespace Magnum { namespace Physics {

8
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<std::uint8_t dimensions> class AbstractBoxRenderer: public AbstractDebugRenderer<dimensions> {
public:

12
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<std::uint8_t> class FlatShader;
}
namespace Physics { namespace Implementation {
namespace Magnum { namespace Physics { namespace Implementation {
struct Options;

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

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

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

2
src/Physics/Plane.h

@ -23,7 +23,7 @@
#include "AbstractShape.h"
#include "Physics.h"
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
namespace Magnum { namespace Physics {

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

2
src/Physics/ShapeGroup.h

@ -24,7 +24,7 @@
#include <type_traits>
#include <utility>
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
namespace Magnum { namespace Physics {

2
src/Physics/Sphere.h

@ -23,7 +23,7 @@
#include "AbstractShape.h"
#include "Physics.h"
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
namespace Magnum { namespace Physics {

2
src/Platform/AbstractXApplication.h

@ -32,8 +32,6 @@
#include "Math/Vector2.h"
#include "AbstractContextHandler.h"
#include "magnumCompatibility.h"
namespace Magnum {
class Context;

2
src/Platform/EglContextHandler.h

@ -31,7 +31,7 @@
#include "AbstractContextHandler.h"
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
namespace Magnum { namespace Platform {

2
src/Platform/GlutApplication.h

@ -26,8 +26,6 @@
#include <GL/freeglut.h>
#include "magnumCompatibility.h"
namespace Magnum {
class Context;

2
src/Platform/GlxContextHandler.h

@ -27,7 +27,7 @@
#include "AbstractContextHandler.h"
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
namespace Magnum { namespace Platform {

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

2
src/Platform/Sdl2Application.h

@ -26,8 +26,6 @@
#include <SDL2/SDL_scancode.h>
#include <Corrade/Containers/EnumSet.h>
#include "magnumCompatibility.h"
namespace Magnum {
class Context;

2
src/Profiler.h

@ -24,7 +24,7 @@
#include <string>
#include <vector>
#include "magnumCompatibility.h"
#include "corradeCompatibility.h"
#include "magnumVisibility.h"
namespace Magnum {

4
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<class T = GLfloat> 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<class T = GLfloat> using AbstractCamera3D = AbstractCamera<3, T>;
#endif
#else

4
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<class T = GLfloat> 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<class T = GLfloat> using AbstractFeature3D = AbstractFeature<3, T>;
#endif
#else

4
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<class Derived, class T = GLfloat> 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<class Derived, class T = GLfloat> using AbstractGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>;
#endif
#else

6
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<class T = GLfloat> 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<class T = GLfloat> using AbstractObject3D = AbstractObject<3, T>;
#endif
#else

4
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<class T = GLfloat> 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<class T = GLfloat> using AbstractTransformation3D = AbstractTransformation<3, T>;
#endif
#else

10
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<class T = GLfloat> 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<class T = GLfloat> 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<std::uint8_t dimensions, class T = GLfloat> using DrawableGroup = FeatureGroup<dimensions, Drawable<dimensions, T>, 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<class T = GLfloat> 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<class T = GLfloat> using DrawableGroup3D = DrawableGroup<3, T>;
#endif
#else

4
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<class Feature, class T = GLfloat> 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<class Feature, class T = GLfloat> using FeatureGroup3D = FeatureGroup<3, Feature, T>;
#endif
#else

18
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<std::uint8_t dimensions, class T = GLfloat> class AbstractCamera;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class T = GLfloat> using AbstractCamera2D = AbstractCamera<2, T>;
template<class T = GLfloat> using AbstractCamera3D = AbstractCamera<3, T>;
#endif
template<std::uint8_t dimensions, class T = GLfloat> class AbstractFeature;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class T = GLfloat> using AbstractFeature2D = AbstractFeature<2, T>;
template<class T = GLfloat> using AbstractFeature3D = AbstractFeature<3, T>;
#endif
template<std::uint8_t dimensions, class Derived, class T = GLfloat> class AbstractGroupedFeature;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class Derived, class T = GLfloat> using AbstractGroupedFeature2D = AbstractGroupedFeature<2, Derived, T>;
template<class Derived, class T = GLfloat> using AbstractGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>;
#endif
template<std::uint8_t dimensions, class T = GLfloat> class AbstractObject;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class T = GLfloat> using AbstractObject2D = AbstractObject<2, T>;
template<class T = GLfloat> using AbstractObject3D = AbstractObject<3, T>;
#endif
@ -58,7 +60,7 @@ enum class TransformationType: std::uint8_t;
#endif
template<std::uint8_t dimensions, class T = GLfloat> class AbstractTransformation;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class T = GLfloat> using AbstractTransformation2D = AbstractTransformation<2, T>;
template<class T = GLfloat> using AbstractTransformation3D = AbstractTransformation<3, T>;
#endif
@ -72,18 +74,18 @@ template<class T = GLfloat> class Camera2D;
template<class T = GLfloat> class Camera3D;
template<std::uint8_t dimensions, class T = GLfloat> class Drawable;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class T = GLfloat> using Drawable2D = Drawable<2, T>;
template<class T = GLfloat> using Drawable3D = Drawable<3, T>;
#endif
template<std::uint8_t dimensions, class Feature, class T = GLfloat> class FeatureGroup;
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<class Feature, class T = GLfloat> using FeatureGroup2D = FeatureGroup<2, Feature, T>;
template<class Feature, class T = GLfloat> using FeatureGroup3D = FeatureGroup<3, Feature, T>;
#endif
#ifndef MAGNUM_GCC46_COMPATIBILITY
#ifndef CORRADE_GCC46_COMPATIBILITY
template<std::uint8_t dimensions, class T = GLfloat> using DrawableGroup = FeatureGroup<dimensions, Drawable<dimensions, T>, T>;
template<class T = GLfloat> using DrawableGroup2D = DrawableGroup<2, T>;
template<class T = GLfloat> using DrawableGroup3D = DrawableGroup<3, T>;

2
src/Test/ResourceManagerTest.cpp

@ -20,6 +20,8 @@
#include "AbstractResourceLoader.h"
#include "ResourceManager.h"
#include "corradeCompatibility.h"
using namespace std;
using namespace Corrade::Utility;

25
src/magnumCompatibility.h

@ -1,25 +0,0 @@
#ifndef magnumCompatibility_h
#define magnumCompatibility_h
/*
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz>
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

1
src/magnumConfigure.h.cmake

@ -1,4 +1,3 @@
#cmakedefine MAGNUM_TARGET_NACL
#cmakedefine MAGNUM_TARGET_GLES
#cmakedefine MAGNUM_TARGET_GLES2
#cmakedefine MAGNUM_GCC46_COMPATIBILITY

Loading…
Cancel
Save