Browse Source

Remove remaining APIs deprecated in 2018.10.

pull/461/head
Vladimír Vondruš 6 years ago
parent
commit
cd48c59cab
  1. 34
      doc/changelog.dox
  2. 12
      src/Magnum/Audio/PlayableGroup.cpp
  3. 8
      src/Magnum/Audio/PlayableGroup.h
  4. 17
      src/Magnum/Audio/Test/PlayableALTest.cpp
  5. 5
      src/Magnum/GL/Buffer.h
  6. 9
      src/Magnum/GL/CubeMapTexture.h
  7. 9
      src/Magnum/GL/CubeMapTextureArray.h
  8. 9
      src/Magnum/GL/RectangleTexture.h
  9. 9
      src/Magnum/GL/Renderer.h
  10. 9
      src/Magnum/GL/Texture.h
  11. 9
      src/Magnum/GL/TextureArray.h
  12. 3
      src/Magnum/Math/CMakeLists.txt
  13. 34
      src/Magnum/Math/Geometry/CMakeLists.txt
  14. 139
      src/Magnum/Math/Geometry/Distance.h
  15. 92
      src/Magnum/Math/Geometry/Intersection.h
  16. 17
      src/Magnum/Math/Intersection.h
  17. 12
      src/Magnum/MeshTools/Compile.cpp
  18. 18
      src/Magnum/MeshTools/Compile.h
  19. 10
      src/Magnum/Platform/AbstractXApplication.cpp
  20. 5
      src/Magnum/Platform/AbstractXApplication.h
  21. 10
      src/Magnum/Platform/AndroidApplication.cpp
  22. 5
      src/Magnum/Platform/AndroidApplication.h
  23. 10
      src/Magnum/Platform/GlfwApplication.cpp
  24. 28
      src/Magnum/Platform/GlfwApplication.h
  25. 12
      src/Magnum/Platform/Screen.h
  26. 10
      src/Magnum/Platform/ScreenedApplication.hpp
  27. 16
      src/Magnum/Platform/Sdl2Application.cpp
  28. 39
      src/Magnum/Platform/Sdl2Application.h
  29. 35
      src/Magnum/Shaders/Generic.h
  30. 8
      src/Magnum/Shaders/VertexColor.h
  31. 8
      src/Magnum/Trade/CameraData.h

34
doc/changelog.dox

@ -60,6 +60,40 @@ See also:
- Fixed compilation of the @ref GL library on macOS with ANGLE --- new code
assumed macOS is always desktop GL (see [mosra/magnum#452](https://github.com/mosra/magnum/issues/452))
@subsection changelog-latest-compatibility Potential compatibility breakages, removed APIs
- Removed remaining APIs deprecated in version 2018.10, in particular:
- @cpp Audio::PlayableGroup::setClean() @ce, use
@ref Audio::Listener::update() instead
- @cpp GL::*Texture::setSRGBDecode() @ce,
@cpp GL::Renderer::Feature::FramebufferSRGB @ce,
@cpp Platform::*Application::GLConfiguration::setSRGBCapable() @ce and
@cpp Platform::*Application::GLConfiguration::isSRGBCapable() @ce, use
@ref GL::Texture::setSrgbDecode() "GL::*Texture::setSrgbDecode()",
@ref GL::Renderer::Feature::FramebufferSrgb,
@ref Platform::Sdl2Application::GLConfiguration::setSrgbCapable() "Platform::*Application::GLConfiguration::setSrgbCapable()" and
@ref Platform::Sdl2Application::GLConfiguration::isSrgbCapable() "Platform::*Application::GLConfiguration::isSrgbCapable()" instead
- `Math::Geometry`, `Math::Geometry::Distance` and
`Math::Geometry::Intersection` namespaces, use @ref Math::Distance and
@ref Math::Intersection instead
- @ref Math::Intersection::planeLine() taking a separate plane normal and
position, use @ref Math::planeEquation() instead
- @ref MeshTools::compile() taking a @ref GL::BufferUsage and returning a
tuple, use the simpler versions instead (note that the
@cpp Trade::MeshData2D @ce / @cpp Trade::MeshData3D @ce overloads are
still present for backwards compatibility)
- `Platform::*Application::viewportEvent(const Vector2i&)`, override the
@ref Platform::Sdl2Application::viewportEvent(ViewportEvent&) "viewportEvent(ViewportEvent&)"
function instead.
- `Platform::Sdl2Application::Configuration::WindowFlags::AllowHighDpi`,
had no effect anymore
- `Shaders::Generic::Color` and `Shaders::VertexColor::Color`, use
@ref Shaders::VertexColor::Color3 or @ref Shaders::VertexColor::Color4
instead
- @ref Trade::CameraData constructor not taking an explicit type enum,
use @ref Trade::CameraData::CameraData(CameraType, Rad, Float, Float, Float, const void*)
instead
@section changelog-2020-06 2020.06
Released 2020-06-27, tagged as

12
src/Magnum/Audio/PlayableGroup.cpp

@ -83,18 +83,6 @@ template<UnsignedInt dimensions> PlayableGroup<dimensions>& PlayableGroup<dimens
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> void PlayableGroup<dimensions>::setClean() {
std::vector<std::reference_wrapper<SceneGraph::AbstractObject<dimensions, Float>>> objects;
objects.reserve(this->size());
for(UnsignedInt i = 0; i < this->size(); ++i)
objects.push_back((*this)[i].object());
SceneGraph::AbstractObject<dimensions, Float>::setClean(objects);
}
#endif
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */

8
src/Magnum/Audio/PlayableGroup.h

@ -99,14 +99,6 @@ template<UnsignedInt dimensions> class PlayableGroup: public SceneGraph::Feature
*/
PlayableGroup& setSoundTransformation(const Matrix4& matrix);
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief Set all contained Playables clean
* @m_deprecated_since{2018,10} Use @ref Listener::update() instead.
*/
CORRADE_DEPRECATED("use Listener::update() instead") void setClean();
#endif
private:
friend Playable<dimensions>;

17
src/Magnum/Audio/Test/PlayableALTest.cpp

@ -75,29 +75,12 @@ void PlayableALTest::group() {
PlayableGroup3D group;
Playable3D playable{object, &group};
#ifdef MAGNUM_BUILD_DEPRECATED
constexpr Vector3 offset{-3.0f, 2.0f, 1.0f};
object.translate(offset);
CORRADE_IGNORE_DEPRECATED_PUSH
group.setClean();
CORRADE_IGNORE_DEPRECATED_POP
CORRADE_COMPARE(playable.source().position(), offset);
#endif
group.setGain(0.5f);
CORRADE_COMPARE(playable.source().gain(), 0.5f);
playable.setGain(0.5f);
CORRADE_COMPARE(playable.source().gain(), 0.25f);
#ifdef MAGNUM_BUILD_DEPRECATED
group.setSoundTransformation(Matrix4::fromDiagonal(Vector4{10.0f, 10.0f, 10.0f, 1.0f}));
CORRADE_IGNORE_DEPRECATED_PUSH
group.setClean();
CORRADE_IGNORE_DEPRECATED_POP
CORRADE_COMPARE(playable.source().position(), offset*10.0f);
#endif
group.play();
group.pause();
group.stop();

5
src/Magnum/GL/Buffer.h

@ -39,11 +39,6 @@
#include "Magnum/GL/AbstractObject.h"
#include "Magnum/GL/GL.h"
#ifdef MAGNUM_BUILD_DEPRECATED
/** @todo remove once people get used to including this where needed */
#include <Corrade/Containers/ArrayViewStl.h>
#endif
namespace Magnum { namespace GL {
/**

9
src/Magnum/GL/CubeMapTexture.h

@ -435,15 +435,6 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture {
AbstractTexture::setSrgbDecode(decode);
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief setSrgbDecode()
* @m_deprecated_since{2018,10} Use @ref setSrgbDecode() instead.
*/
CORRADE_DEPRECATED("use setSrgbDecode() instead") CubeMapTexture& setSRGBDecode(bool decode) {
return setSrgbDecode(decode);
}
#endif
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)

9
src/Magnum/GL/CubeMapTextureArray.h

@ -388,15 +388,6 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture {
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief setSrgbDecode()
* @m_deprecated_since{2018,10} Use @ref setSrgbDecode() instead.
*/
CORRADE_DEPRECATED("use setSrgbDecode() instead") CubeMapTextureArray& setSRGBDecode(bool decode) {
return setSrgbDecode(decode);
}
#endif
/**
* @brief @copybrief Texture::setSwizzle()
* @return Reference to self (for method chaining)

9
src/Magnum/GL/RectangleTexture.h

@ -280,15 +280,6 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture {
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief setSrgbDecode()
* @m_deprecated_since{2018,10} Use @ref setSrgbDecode() instead.
*/
CORRADE_DEPRECATED("use setSrgbDecode() instead") RectangleTexture& setSRGBDecode(bool decode) {
return setSrgbDecode(decode);
}
#endif
/**
* @brief @copybrief Texture::setSwizzle()
* @return Reference to self (for method chaining)

9
src/Magnum/GL/Renderer.h

@ -364,15 +364,6 @@ class MAGNUM_GL_EXPORT Renderer {
#else
FramebufferSrgb = GL_FRAMEBUFFER_SRGB_EXT,
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* Perform sRGB conversion of values written to sRGB framebuffers.
* @m_deprecated_since{2018,10} Use @ref Feature::FramebufferSrgb
* instead.
*/
FramebufferSRGB CORRADE_DEPRECATED_ENUM("use GL::Renderer::Feature::FramebufferSrgb instead") = FramebufferSrgb,
#endif
#endif
#ifndef MAGNUM_TARGET_GLES

9
src/Magnum/GL/Texture.h

@ -582,15 +582,6 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
AbstractTexture::setSrgbDecode(decode);
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief setSrgbDecode()
* @m_deprecated_since{2018,10} Use @ref setSrgbDecode() instead.
*/
CORRADE_DEPRECATED("use setSrgbDecode() instead") Texture<dimensions>& setSRGBDecode(bool decode) {
return setSrgbDecode(decode);
}
#endif
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)

9
src/Magnum/GL/TextureArray.h

@ -415,15 +415,6 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief setSrgbDecode()
* @m_deprecated_since{2018,10} Use @ref setSrgbDecode() instead.
*/
CORRADE_DEPRECATED("use setSrgbDecode() instead") TextureArray<dimensions>& setSRGBDecode(bool decode) {
return setSrgbDecode(decode);
}
#endif
/**
* @brief @copybrief Texture::setSwizzle()
* @return Reference to self (for method chaining)

3
src/Magnum/Math/CMakeLists.txt

@ -72,9 +72,6 @@ set_target_properties(MagnumMath PROPERTIES FOLDER "Magnum/Math")
install(FILES ${MagnumMath_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Math)
add_subdirectory(Algorithms)
if(BUILD_DEPRECATED)
add_subdirectory(Geometry)
endif()
if(BUILD_TESTS)
add_subdirectory(Test)

34
src/Magnum/Math/Geometry/CMakeLists.txt

@ -1,34 +0,0 @@
#
# This file is part of Magnum.
#
# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
# 2020 Vladimír Vondruš <mosra@centrum.cz>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
set(MagnumMathGeometry_HEADERS
Distance.h
Intersection.h)
# Force IDEs to display all header files in project view
add_custom_target(MagnumMathGeometry SOURCES ${MagnumMathGeometry_HEADERS})
set_target_properties(MagnumMathGeometry PROPERTIES FOLDER "Magnum/Math/Geometry")
install(FILES ${MagnumMathGeometry_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Math/Geometry)

139
src/Magnum/Math/Geometry/Distance.h

@ -1,139 +0,0 @@
#ifndef Magnum_Math_Geometry_Distance_h
#define Magnum_Math_Geometry_Distance_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020 Vladimír Vondruš <mosra@centrum.cz>
Copyright © 2016 Jonathan Hale <squareys@googlemail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
/** @file
* @m_deprecated_since{2018,10} Use @ref Magnum/Math/Distance.h instead.
*/
#include "Magnum/configure.h"
#ifdef MAGNUM_BUILD_DEPRECATED
#include "Magnum/Math/Distance.h"
CORRADE_DEPRECATED_FILE("use Magnum/Math/Distance.h instead")
/** @namespace Magnum::Math::Geometry::Distance
* @m_deprecated_since{2018,10} Use @ref Magnum::Math::Distance instead.
*/
namespace Magnum { namespace Math { namespace Geometry { namespace Distance {
/** @brief @copybrief Math::Distance::linePointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePointSquared() instead") T linePointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) {
return Math::Distance::linePointSquared(a, b, point);
}
/** @brief @copybrief Math::Distance::linePoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePoint() instead") T linePoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) {
return Math::Distance::linePoint(a, b, point);
}
/** @brief @copybrief Math::Distance::linePointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePointSquared() instead") T linePointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) {
return Math::Distance::linePointSquared(a, b, point);
}
/** @brief @copybrief Math::Distance::linePoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePoint() instead") T linePoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) {
return Math::Distance::linePoint(a, b, point);
}
/** @brief @copybrief Math::Distance::lineSegmentPointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPointSquared() instead") T lineSegmentPointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) {
return Math::Distance::lineSegmentPointSquared(a, b, point);
}
/** @brief @copybrief Math::Distance::lineSegmentPoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPoint() instead") T lineSegmentPoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) {
return Math::Distance::lineSegmentPoint(a, b, point);
}
/** @brief @copybrief Math::Distance::lineSegmentPointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPointSquared() instead") T lineSegmentPointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) {
return Math::Distance::lineSegmentPointSquared(a, b, point);
}
/** @brief @copybrief Math::Distance::lineSegmentPoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPointSquared() instead") T lineSegmentPoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) {
return Math::Distance::lineSegmentPoint(a, b, point);
}
/** @brief @copybrief Math::Distance::pointPlaneScaled(const Vector3<T>&, const Vector4<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::pointPlaneScaled(const Vector3<T>&, const Vector4<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::pointPlaneScaled() instead") T pointPlaneScaled(const Vector3<T>& point, const Vector4<T>& plane) {
return Math::Distance::pointPlaneScaled(point, plane);
}
/** @brief @copybrief Math::Distance::pointPlane(const Vector3<T>&, const Vector4<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::pointPlane(const Vector3<T>&, const Vector4<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::pointPlane() instead") T pointPlane(const Vector3<T>& point, const Vector4<T>& plane) {
return Math::Distance::pointPlane(point, plane);
}
/** @brief @copybrief Math::Distance::pointPlaneNormalized(const Vector3<T>&, const Vector4<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Distance::pointPlaneNormalized(const Vector3<T>&, const Vector4<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::pointPlaneNormalized() instead") T pointPlaneNormalized(const Vector3<T>& point, const Vector4<T>& plane) {
return Math::Distance::pointPlaneNormalized(point, plane);
}
}}}}
#else
#error use Magnum/Math/Distance.h instead
#endif
#endif

92
src/Magnum/Math/Geometry/Intersection.h

@ -1,92 +0,0 @@
#ifndef Magnum_Math_Geometry_Intersection_h
#define Magnum_Math_Geometry_Intersection_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020 Vladimír Vondruš <mosra@centrum.cz>
Copyright © 2016, 2018 Jonathan Hale <squareys@googlemail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
/** @file
* @m_deprecated_since{201,10} Use @ref Magnum/Math/Intersection.h instead.
*/
#include "Magnum/configure.h"
#ifdef MAGNUM_BUILD_DEPRECATED
#include "Magnum/Math/Intersection.h"
CORRADE_DEPRECATED_FILE("use Magnum/Math/Intersection.h instead")
/** @namespace Magnum::Math::Geometry::Intersection
* @m_deprecated_since{2018,10} Use @ref Magnum::Math::Intersection instead.
*/
namespace Magnum { namespace Math { namespace Geometry { namespace Intersection {
/** @brief @copybrief Math::Intersection::lineSegmentLineSegment(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::lineSegmentLineSegment(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::lineSegmentLineSegment() instead") std::pair<T, T> lineSegmentLineSegment(const Vector2<T>& p, const Vector2<T>& r, const Vector2<T>& q, const Vector2<T>& s) {
return Math::Intersection::lineSegmentLineSegment(p, r, q, s);
}
/** @brief @copybrief Math::Intersection::lineSegmentLine(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::lineSegmentLine(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::lineSegmentLine() instead") T lineSegmentLine(const Vector2<T>& p, const Vector2<T>& r, const Vector2<T>& q, const Vector2<T>& s) {
return Math::Intersection::lineSegmentLine(p, r, q, s);
}
/** @brief @copybrief Math::Intersection::planeLine(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::planeLine(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::planeLine() instead") T planeLine(const Vector3<T>& planePosition, const Vector3<T>& planeNormal, const Vector3<T>& p, const Vector3<T>& r) {
return Math::Intersection::planeLine(planePosition, planeNormal, p, r);
}
/** @brief @copybrief Math::Intersection::pointFrustum(const Vector3<T>&, const Frustum<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::pointFrustum(const Vector3<T>&, const Frustum<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::pointFrustum() instead") bool pointFrustum(const Vector3<T>& point, const Frustum<T>& frustum) {
return Math::Intersection::pointFrustum(point, frustum);
}
/**
* @brief @copybrief Math::Intersection::rangeFrustum(const Range3D<T>&, const Frustum<T>&)
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::rangeFrustum(const Range3D<T>&, const Frustum<T>&)
* instead.
*/
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::rangeFrustum() instead") bool boxFrustum(const Range3D<T>& box, const Frustum<T>& frustum) {
return Math::Intersection::rangeFrustum(box, frustum);
}
}}}}
#else
#error use Magnum/Math/Intesection.h instead
#endif
#endif

17
src/Magnum/Math/Intersection.h

@ -135,23 +135,6 @@ template<class T> inline T planeLine(const Vector4<T>& plane, const Vector3<T>&
return (-plane.w() - dot(plane.xyz(), p))/dot(plane.xyz(), r);
}
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@brief Intersection of a plane and line
@param planePosition Plane position
@param planeNormal Plane normal
@param p Starting point of the line
@param r Direction of the line
@m_deprecated_since{2018,10} Use @ref planeLine(const Vector4<T>&, const Vector3<T>&, const Vector3<T>&)
together with @ref planeEquation(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
instead.
*/
template<class T> inline CORRADE_DEPRECATED("use planeLine(const Vector4&, const Vector3&, const Vector3&) together with planeEquation(const Vector3&, const Vector3&) instead") T planeLine(const Vector3<T>& planePosition, const Vector3<T>& planeNormal, const Vector3<T>& p, const Vector3<T>& r) {
return planeLine(planeEquation(planePosition, planeNormal), p, r);
}
#endif
/**
@brief Intersection of a point and a frustum
@param point Point

12
src/Magnum/MeshTools/Compile.cpp

@ -309,12 +309,6 @@ GL::Mesh compile(const Trade::MeshData2D& meshData) {
return mesh;
}
std::tuple<GL::Mesh, std::unique_ptr<GL::Buffer>, std::unique_ptr<GL::Buffer>> compile(const Trade::MeshData2D& meshData, GL::BufferUsage) {
return std::make_tuple(compile(meshData),
std::unique_ptr<GL::Buffer>{new GL::Buffer{NoCreate}},
std::unique_ptr<GL::Buffer>{meshData.isIndexed() ? new GL::Buffer{NoCreate} : nullptr});
}
GL::Mesh compile(const Trade::MeshData3D& meshData, CompileFlags flags) {
GL::Mesh mesh;
mesh.setPrimitive(meshData.primitive());
@ -468,12 +462,6 @@ GL::Mesh compile(const Trade::MeshData3D& meshData, CompileFlags flags) {
return mesh;
}
std::tuple<GL::Mesh, std::unique_ptr<GL::Buffer>, std::unique_ptr<GL::Buffer>> compile(const Trade::MeshData3D& meshData, GL::BufferUsage) {
return std::make_tuple(compile(meshData),
std::unique_ptr<GL::Buffer>{new GL::Buffer{NoCreate}},
std::unique_ptr<GL::Buffer>{meshData.isIndexed() ? new GL::Buffer{NoCreate} : nullptr});
}
CORRADE_IGNORE_DEPRECATED_POP
#endif

18
src/Magnum/MeshTools/Compile.h

@ -227,15 +227,6 @@ CORRADE_IGNORE_DEPRECATED_PUSH
CORRADE_DEPRECATED("use compile(const Trade::MeshData&) instead") MAGNUM_MESHTOOLS_EXPORT GL::Mesh compile(const Trade::MeshData2D& meshData);
CORRADE_IGNORE_DEPRECATED_POP
/** @brief Compile 2D mesh data
* @m_deprecated_since{2018,10} Use @ref compile(const Trade::MeshData&)
* instead. The @p usage parameter is ignored and returned buffer
* instances are empty.
*/
CORRADE_IGNORE_DEPRECATED_PUSH
CORRADE_DEPRECATED("use compile(const Trade::MeshData&) instead") MAGNUM_MESHTOOLS_EXPORT std::tuple<GL::Mesh, std::unique_ptr<GL::Buffer>, std::unique_ptr<GL::Buffer>> compile(const Trade::MeshData2D& meshData, GL::BufferUsage usage);
CORRADE_IGNORE_DEPRECATED_POP
/**
@brief Compile 3D mesh data
@m_deprecated_since{2020,06} Use @ref compile(const Trade::MeshData&, CompileFlags)
@ -266,15 +257,6 @@ greater flexibility.
CORRADE_IGNORE_DEPRECATED_PUSH
CORRADE_DEPRECATED("use compile(const Trade::MeshData&, CompileFlags) instead") MAGNUM_MESHTOOLS_EXPORT GL::Mesh compile(const Trade::MeshData3D& meshData, CompileFlags flags = {});
CORRADE_IGNORE_DEPRECATED_POP
/** @brief Compile 3D mesh data
* @m_deprecated_since{2018,10} Use @ref compile(const Trade::MeshData&, CompileFlags)
* instead. The @p usage parameter is ignored and returned buffer
* instances are empty.
*/
CORRADE_IGNORE_DEPRECATED_PUSH
CORRADE_DEPRECATED("use compile(const Trade::MeshData&) instead") MAGNUM_MESHTOOLS_EXPORT std::tuple<GL::Mesh, std::unique_ptr<GL::Buffer>, std::unique_ptr<GL::Buffer>> compile(const Trade::MeshData3D& meshData, GL::BufferUsage usage);
CORRADE_IGNORE_DEPRECATED_POP
#endif
}}

10
src/Magnum/Platform/AbstractXApplication.cpp

@ -190,19 +190,9 @@ bool AbstractXApplication::mainLoopIteration() {
}
void AbstractXApplication::viewportEvent(ViewportEvent& event) {
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
viewportEvent(event.framebufferSize());
CORRADE_IGNORE_DEPRECATED_POP
#else
static_cast<void>(event);
#endif
}
#ifdef MAGNUM_BUILD_DEPRECATED
void AbstractXApplication::viewportEvent(const Vector2i&) {}
#endif
void AbstractXApplication::keyPressEvent(KeyEvent&) {}
void AbstractXApplication::keyReleaseEvent(KeyEvent&) {}
void AbstractXApplication::mousePressEvent(MouseEvent&) {}

5
src/Magnum/Platform/AbstractXApplication.h

@ -249,11 +249,6 @@ class AbstractXApplication {
*/
virtual void viewportEvent(ViewportEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** @copydoc GlfwApplication::viewportEvent(const Vector2i&) */
virtual CORRADE_DEPRECATED("use viewportEvent(ViewportEvent&) instead") void viewportEvent(const Vector2i& size);
#endif
/** @copydoc Sdl2Application::drawEvent() */
virtual void drawEvent() = 0;

10
src/Magnum/Platform/AndroidApplication.cpp

@ -176,19 +176,9 @@ void AndroidApplication::swapBuffers() {
}
void AndroidApplication::viewportEvent(ViewportEvent& event) {
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
viewportEvent(event.windowSize());
CORRADE_IGNORE_DEPRECATED_POP
#else
static_cast<void>(event);
#endif
}
#ifdef MAGNUM_BUILD_DEPRECATED
void AndroidApplication::viewportEvent(const Vector2i&) {}
#endif
void AndroidApplication::mousePressEvent(MouseEvent&) {}
void AndroidApplication::mouseReleaseEvent(MouseEvent&) {}
void AndroidApplication::mouseMoveEvent(MouseMoveEvent&) {}

5
src/Magnum/Platform/AndroidApplication.h

@ -377,11 +377,6 @@ class AndroidApplication {
*/
virtual void viewportEvent(ViewportEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** @copydoc GlfwApplication::viewportEvent(const Vector2i&) */
virtual CORRADE_DEPRECATED("use viewportEvent(ViewportEvent&) instead") void viewportEvent(const Vector2i& size);
#endif
/** @copydoc Sdl2Application::drawEvent() */
virtual void drawEvent() = 0;

10
src/Magnum/Platform/GlfwApplication.cpp

@ -844,19 +844,9 @@ void GlfwApplication::exitEvent(ExitEvent& event) {
}
void GlfwApplication::viewportEvent(ViewportEvent& event) {
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
viewportEvent(event.windowSize());
CORRADE_IGNORE_DEPRECATED_POP
#else
static_cast<void>(event);
#endif
}
#ifdef MAGNUM_BUILD_DEPRECATED
void GlfwApplication::viewportEvent(const Vector2i&) {}
#endif
void GlfwApplication::keyPressEvent(KeyEvent&) {}
void GlfwApplication::keyReleaseEvent(KeyEvent&) {}
void GlfwApplication::mousePressEvent(MouseEvent&) {}

28
src/Magnum/Platform/GlfwApplication.h

@ -535,18 +535,6 @@ class GlfwApplication {
*/
virtual void viewportEvent(ViewportEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief viewportEvent(ViewportEvent&)
* @m_deprecated_since{2018,10} Use @ref viewportEvent(ViewportEvent&)
* instead. To preserve backwards compatibility, this function is
* called from @ref viewportEvent(ViewportEvent&) with
* @ref ViewportEvent::windowSize() passed to @p size. Overriding
* the new function will cause this function to not be called
* anymore.
*/
virtual CORRADE_DEPRECATED("use viewportEvent(ViewportEvent&) instead") void viewportEvent(const Vector2i& size);
#endif
/** @copydoc Sdl2Application::drawEvent() */
virtual void drawEvent() = 0;
@ -951,22 +939,6 @@ class GlfwApplication::GLConfiguration {
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief isSrgbCapable()
* @m_deprecated_since{2018,10} Use @ref isSrgbCapable() instead.
*/
CORRADE_DEPRECATED("use isSrgbCapable() instead") bool isSRGBCapable() const { return isSrgbCapable(); }
/**
* @brief @copybrief setSrgbCapable()
* @m_deprecated_since{2018,10} Use @ref setSrgbCapable() instead.
*/
CORRADE_DEPRECATED("use setSrgbCapable() instead") GLConfiguration& setSRGBCapable(bool enabled) {
return setSrgbCapable(enabled);
}
#endif
private:
Vector4i _colorBufferSize;
Int _depthBufferSize, _stencilBufferSize;

12
src/Magnum/Platform/Screen.h

@ -354,18 +354,6 @@ template<class Application> class BasicScreen:
*/
virtual void viewportEvent(ViewportEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief viewportEvent(ViewportEvent&)
* @m_deprecated_since{2018,10} Use @ref viewportEvent(ViewportEvent&)
* instead. To preserve backwards compatibility, this function is
* called from @ref viewportEvent(ViewportEvent&) with
* @ref Sdl2Application::ViewportEvent::windowSize() "*Application::ViewportEvent::windowSize()"
* passed to @p size. Overriding the new function will cause this
* function to not be called anymore.
*/
virtual CORRADE_DEPRECATED("use viewportEvent(ViewportEvent&) instead") void viewportEvent(const Vector2i& size);
#endif
/**
* @brief Draw event
*

10
src/Magnum/Platform/ScreenedApplication.hpp

@ -139,19 +139,9 @@ template<class Application> void BasicScreen<Application>::focusEvent() {}
template<class Application> void BasicScreen<Application>::blurEvent() {}
template<class Application> void BasicScreen<Application>::viewportEvent(ViewportEvent& event) {
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
viewportEvent(event.windowSize());
CORRADE_IGNORE_DEPRECATED_POP
#else
static_cast<void>(event);
#endif
}
#ifdef MAGNUM_BUILD_DEPRECATED
template<class Application> void BasicScreen<Application>::viewportEvent(const Vector2i&) {}
#endif
template<class Application> void BasicScreen<Application>::mousePressEvent(MouseEvent&) {}
template<class Application> void BasicScreen<Application>::mouseReleaseEvent(MouseEvent&) {}
template<class Application> void BasicScreen<Application>::mouseMoveEvent(MouseMoveEvent&) {}

16
src/Magnum/Platform/Sdl2Application.cpp

@ -1146,25 +1146,9 @@ void Sdl2Application::anyEvent(SDL_Event&) {
}
void Sdl2Application::viewportEvent(ViewportEvent& event) {
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
viewportEvent(
#ifdef MAGNUM_TARGET_GL
event.framebufferSize()
#else
event.windowSize()
#endif
);
CORRADE_IGNORE_DEPRECATED_POP
#else
static_cast<void>(event);
#endif
}
#ifdef MAGNUM_BUILD_DEPRECATED
void Sdl2Application::viewportEvent(const Vector2i&) {}
#endif
void Sdl2Application::keyPressEvent(KeyEvent&) {}
void Sdl2Application::keyReleaseEvent(KeyEvent&) {}
void Sdl2Application::mousePressEvent(MouseEvent&) {}

39
src/Magnum/Platform/Sdl2Application.h

@ -879,18 +879,6 @@ class Sdl2Application {
*/
virtual void viewportEvent(ViewportEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief viewportEvent(ViewportEvent&)
* @m_deprecated_since{2018,10} Use @ref viewportEvent(ViewportEvent&)
* instead. To preserve backwards compatibility, this function is
* called from @ref viewportEvent(ViewportEvent&) with
* @ref ViewportEvent::framebufferSize() passed to @p size.
* Overriding the new function will cause this function to not be
* called anymore.
*/
virtual CORRADE_DEPRECATED("use viewportEvent(ViewportEvent&) instead") void viewportEvent(const Vector2i& size);
#endif
/**
* @brief Draw event
*
@ -1440,22 +1428,6 @@ class Sdl2Application::GLConfiguration {
_srgbCapable = enabled;
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief isSrgbCapable()
* @m_deprecated_since{2018,10} Use @ref isSrgbCapable() instead.
*/
CORRADE_DEPRECATED("use isSrgbCapable() instead") bool isSRGBCapable() const { return isSrgbCapable(); }
/**
* @brief @copybrief setSrgbCapable()
* @m_deprecated_since{2018,10} Use @ref setSrgbCapable() instead.
*/
CORRADE_DEPRECATED("use setSrgbCapable() instead") GLConfiguration& setSRGBCapable(bool enabled) {
return setSrgbCapable(enabled);
}
#endif
#endif
private:
@ -1550,17 +1522,6 @@ class Sdl2Application::Configuration {
Borderless = SDL_WINDOW_BORDERLESS,
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* Allow high DPI.
*
* @m_deprecated_since{2018,10} Has no effect, as this flag is
* passed implicitly on platforms where needed. See
* @ref Platform-Sdl2Application-dpi for more information.
*/
AllowHighDpi CORRADE_DEPRECATED_ENUM("has no effect, passed implicitly on platforms that need it") = 0,
#endif
#ifndef CORRADE_TARGET_EMSCRIPTEN
/**
* Hidden window

35
src/Magnum/Shaders/Generic.h

@ -31,10 +31,6 @@
#include "Magnum/GL/Attribute.h"
#ifdef MAGNUM_BUILD_DEPRECATED
#include <Corrade/Utility/Macros.h>
#endif
namespace Magnum { namespace Shaders {
/**
@ -431,29 +427,6 @@ template<UnsignedInt dimensions> struct Generic {
* in WebGL 1.0.
*/
typedef GL::Attribute<15, Vector2> TextureOffset;
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief Vertex color
* @m_deprecated_since{2018,10} Use @ref Color3 or @ref Color4 instead.
*/
struct Color: GL::Attribute<3, Magnum::Color4> {
/**
* @brief Constructor
* @param components Component count
* @param dataType Type of passed data
* @param dataOptions Data options
*
* @m_deprecated_since{2018,10} Use @ref Color3 or @ref Color4 instead.
*/
CORRADE_DEPRECATED("use Color3 or Color4 instead") constexpr explicit Color(Components components, DataType dataType = DataType::Float, DataOptions dataOptions = {});
/** @brief @copybrief Color(Components, DataType, DataOptions)
* @m_deprecated_since{2018,10} Use @ref Color3 or @ref Color4 instead.
*/
CORRADE_DEPRECATED("use Color3 or Color4 instead") constexpr explicit Color(DataType dataType = DataType::Float, DataOptions dataOptions = {});
};
#endif
};
#endif
@ -480,14 +453,6 @@ struct BaseGeneric {
#endif
typedef GL::Attribute<15, Vector2> TextureOffset;
#ifdef MAGNUM_BUILD_DEPRECATED
struct Color: GL::Attribute<3, Magnum::Color4> {
CORRADE_DEPRECATED("use Color3 or Color4 instead") constexpr explicit Color(Components components, DataType dataType = DataType::Float, DataOptions dataOptions = DataOptions()): Attribute<3, Magnum::Color4>{components, dataType, dataOptions} {}
CORRADE_DEPRECATED("use Color3 or Color4 instead") constexpr explicit Color(DataType dataType = DataType::Float, DataOptions dataOptions = DataOptions()): Attribute<3, Magnum::Color4>{Components::Three, dataType, dataOptions} {}
};
#endif
};
template<> struct Generic<2>: BaseGeneric {

8
src/Magnum/Shaders/VertexColor.h

@ -105,14 +105,6 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColor: public
ColorOutput = Generic<dimensions>::ColorOutput
};
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief Vertex color
* @m_deprecated_since{2018,10} Use @ref Color3 or @ref Color4 instead.
*/
typedef CORRADE_DEPRECATED("use Color3 or Color4 instead") typename Generic<dimensions>::Color Color;
#endif
explicit VertexColor();
/**

8
src/Magnum/Trade/CameraData.h

@ -96,14 +96,6 @@ class MAGNUM_TRADE_EXPORT CameraData {
*/
explicit CameraData(CameraType type, const Vector2& size, Float near, Float far, const void* importerState = nullptr) noexcept;
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief CameraData(CameraType, Rad, Float, Float, Float, const void*)
* @m_deprecated_since{2018,10} Use @ref CameraData(CameraType, Rad, Float, Float, Float, const void*)
* instead.
*/
explicit CORRADE_DEPRECATED("use CameraData(CameraType, Rad, Float, Float, const void*) instead") CameraData(Rad fov, Float near, Float far, const void* importerState = nullptr) noexcept: CameraData{CameraType::Perspective3D, fov, 1.0f, near, far, importerState} {}
#endif
/** @brief Copying is not allowed */
CameraData(const CameraData&) = delete;

Loading…
Cancel
Save