diff --git a/src/Context.cpp b/src/Context.cpp index f4a2a2113..3e314d003 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -182,7 +182,7 @@ Context::Context() { Version::None }; size_t future = 0; - while(versions[future] != Version::None && versions[future] < _version) + while(versions[future] != Version::None && !isVersionSupported(_version)) ++future; /* List of extensions from future versions (extensions from current and diff --git a/src/Context.h b/src/Context.h index d9f6decd2..d74630b15 100644 --- a/src/Context.h +++ b/src/Context.h @@ -235,7 +235,7 @@ class MAGNUM_EXPORT Context { * @see isExtensionSupported(const Extension&) const */ template inline bool isExtensionSupported() const { - return _version >= T::coreVersion() || (_version >= T::requiredVersion() && extensionStatus[T::Index]); + return isVersionSupported(T::coreVersion()) || (isVersionSupported(T::requiredVersion()) && extensionStatus[T::Index]); } /** @@ -248,7 +248,7 @@ class MAGNUM_EXPORT Context { * @see supportedExtensions(), Extension::extensions() */ inline bool isExtensionSupported(const Extension& extension) const { - return _version >= extension._coreVersion || (_version >= extension._requiredVersion && extensionStatus[extension._index]); + return isVersionSupported(extension._coreVersion) || (isVersionSupported(extension._requiredVersion) && extensionStatus[extension._index]); } #ifndef DOXYGEN_GENERATING_OUTPUT diff --git a/src/Physics/Plane.cpp b/src/Physics/Plane.cpp index 79ead18c7..b55c1d7a2 100644 --- a/src/Physics/Plane.cpp +++ b/src/Physics/Plane.cpp @@ -38,7 +38,7 @@ bool Plane::collides(const AbstractShape<3>* other) const { if(other->type() == Type::LineSegment) return *this % *static_cast(other); - return AbstractShape::collides(other); + return AbstractShape<3>::collides(other); } bool Plane::operator%(const Line3D& other) const { diff --git a/src/SceneGraph/Camera.h b/src/SceneGraph/Camera.h index 69427db5c..21325afce 100644 --- a/src/SceneGraph/Camera.h +++ b/src/SceneGraph/Camera.h @@ -193,7 +193,7 @@ class SCENEGRAPH_EXPORT Camera2D: public AbstractCamera<2> { * Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions). * @see setOrthographic() */ - inline Camera2D(Object2D* parent = nullptr): AbstractCamera(parent) {} + inline Camera2D(Object2D* parent = nullptr): AbstractCamera<2>(parent) {} /** * @brief Set projection @@ -220,7 +220,7 @@ class SCENEGRAPH_EXPORT Camera3D: public AbstractCamera<3> { * Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions). * @see setOrthographic(), setPerspective() */ - inline Camera3D(Object3D* parent = nullptr): AbstractCamera(parent), _near(0.0f), _far(0.0f) {} + inline Camera3D(Object3D* parent = nullptr): AbstractCamera<3>(parent), _near(0.0f), _far(0.0f) {} /** * @brief Set orthographic projection diff --git a/src/SceneGraph/Object.h b/src/SceneGraph/Object.h index 86d10a5a0..61038bc5c 100644 --- a/src/SceneGraph/Object.h +++ b/src/SceneGraph/Object.h @@ -320,7 +320,7 @@ template inline void AbstractObject::clean( class SCENEGRAPH_EXPORT Object2D: public AbstractObject<2> { public: /** @copydoc AbstractObject::AbstractObject() */ - inline Object2D(Object2D* parent = nullptr): AbstractObject(parent) {} + inline Object2D(Object2D* parent = nullptr): AbstractObject<2>(parent) {} /** * @brief Translate object @@ -375,7 +375,7 @@ class SCENEGRAPH_EXPORT Object2D: public AbstractObject<2> { class SCENEGRAPH_EXPORT Object3D: public AbstractObject<3> { public: /** @copydoc AbstractObject::AbstractObject() */ - inline Object3D(Object3D* parent = nullptr): AbstractObject(parent) {} + inline Object3D(Object3D* parent = nullptr): AbstractObject<3>(parent) {} /** * @brief Translate object