DebugTools: deprecate ForceRenderer and ObjectRenderer.
"These seemed like a good idea at the time." But that was in 2013 and
while that might have been acceptable back then, it's not anymore, it's
all just a complex abstraction that prevents any reasonable resource
reuse and forces a dedicated draw call for each use.
Just do this directly from the corresponding Primitives instead.
Deprecating those allows me to eventually deprecate the (also
overengineered) ResourceManager class, at which point Magnum should be
finally free from the worst design decisions from 15 years ago.
Unfortunately several examples still rely on it (while it only makes
them more complex, not better), have to wait until those are cleaned up
first.
template<UnsignedIntdimensions>classCORRADE_DEPRECATED("use Primitives::arrow2D() or arrow3D() in a custom drawable instead")ForceRenderer:publicSceneGraph::Drawable<dimensions,Float>{
public:
/**
*@briefConstructor
@ -126,13 +140,17 @@ template<UnsignedInt dimensions> class ForceRenderer: public SceneGraph::Drawabl
*moreinformation.
*@paramdrawablesDrawablegroup
*/
CORRADE_IGNORE_DEPRECATED_PUSH/* GCC 4.8 warns due to the argument */
template<UnsignedIntdimensions>classCORRADE_DEPRECATED("use Primitives::axis2D() or axis3D() in a custom drawable instead")ObjectRenderer:publicSceneGraph::Drawable<dimensions,Float>{
public:
/**
*@briefConstructor
@ -106,14 +118,18 @@ template<UnsignedInt dimensions> class ObjectRenderer: public SceneGraph::Drawab
#ifdef CORRADE_TARGET_MSVC /* This is not a bug, this is a feature :( Not even /permissive- helps. */
#ifdef CORRADE_TARGET_MSVC
#include"Magnum/DebugTools/ForceRenderer.h"
#include"Magnum/DebugTools/ObjectRenderer.h"
#include"Magnum/GL/AbstractShaderProgram.h"
@ -53,10 +56,17 @@
#include"Magnum/GL/MeshView.h"
#endif
#ifndef _MAGNUM_NO_DEPRECATED_RESOURCEMANAGER
CORRADE_DEPRECATED_FILE("use Magnum/Primitives/Arrow.h / Magnum/Primitives/Axis.h and Primitives::arrow2D() / axis2D() or arrow3D() / axis3D() in a custom drawable instead")
CORRADE_IGNORE_DEPRECATED_PUSH/* GCC 4.8 warns due to the base types */
classCORRADE_DEPRECATED("use Primitives::arrow2D() / axis2D or arrow3D() / axis3D() in a custom drawable instead")MAGNUM_DEBUGTOOLS_EXPORTResourceManager:publicMagnum::ResourceManager<GL::AbstractShaderProgram,GL::Buffer,GL::Mesh,GL::MeshView,DebugTools::ForceRendererOptions,DebugTools::ObjectRendererOptions>
{
public:
explicitResourceManager();
~ResourceManager();
};
#else
CORRADE_IGNORE_DEPRECATED_POP
#elif !defined(MAGNUM_BUILD_DEPRECATED)
#error use Magnum/Primitives/Arrow.h / Magnum/Primitives/Axis.h and Primitives::arrow2D() / axis2D() or arrow3D() / axis3D() in a custom drawable instead
#elif !defined(MAGNUM_TARGET_GL)
#error this header is available only in the OpenGL build