Browse Source

Shaders: what, C++, forward declarations work here but not there?!

Who designed this misfeature, ugh.
pull/601/head
Vladimír Vondruš 3 years ago
parent
commit
f75449240e
  1. 6
      src/Magnum/Shaders/DistanceFieldVectorGL.cpp
  2. 16
      src/Magnum/Shaders/DistanceFieldVectorGL.h
  3. 6
      src/Magnum/Shaders/FlatGL.cpp
  4. 16
      src/Magnum/Shaders/FlatGL.h
  5. 6
      src/Magnum/Shaders/VectorGL.cpp
  6. 16
      src/Magnum/Shaders/VectorGL.h
  7. 6
      src/Magnum/Shaders/VertexColorGL.cpp
  8. 16
      src/Magnum/Shaders/VertexColorGL.h

6
src/Magnum/Shaders/DistanceFieldVectorGL.cpp

@ -166,10 +166,6 @@ template<UnsignedInt dimensions> typename DistanceFieldVectorGL<dimensions>::Com
};
}
template<UnsignedInt dimensions> typename DistanceFieldVectorGL<dimensions>::CompileState DistanceFieldVectorGL<dimensions>::compile() {
return compile(Configuration{});
}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> typename DistanceFieldVectorGL<dimensions>::CompileState DistanceFieldVectorGL<dimensions>::compile(const Flags flags) {
return compile(Configuration{}
@ -253,8 +249,6 @@ template<UnsignedInt dimensions> DistanceFieldVectorGL<dimensions>::DistanceFiel
template<UnsignedInt dimensions> DistanceFieldVectorGL<dimensions>::DistanceFieldVectorGL(const Configuration& configuration): DistanceFieldVectorGL{compile(configuration)} {}
template<UnsignedInt dimensions> DistanceFieldVectorGL<dimensions>::DistanceFieldVectorGL(): DistanceFieldVectorGL{Configuration{}} {}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> DistanceFieldVectorGL<dimensions>::DistanceFieldVectorGL(const Flags flags): DistanceFieldVectorGL{compile(Configuration{}
.setFlags(flags))} {}

16
src/Magnum/Shaders/DistanceFieldVectorGL.h

@ -237,13 +237,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT DistanceFieldVector
* @ref shaders-async for more information.
* @see @ref DistanceFieldVectorGL(CompileState&&)
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
static CompileState compile(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
static CompileState compile(const Configuration& configuration);
static CompileState compile();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@ -270,13 +266,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT DistanceFieldVector
* @brief Constructor
* @m_since_latest
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
explicit DistanceFieldVectorGL(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
explicit DistanceFieldVectorGL(const Configuration& configuration);
explicit DistanceFieldVectorGL();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**

6
src/Magnum/Shaders/FlatGL.cpp

@ -296,10 +296,6 @@ template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatG
};
}
template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatGL<dimensions>::compile() {
return compile(Configuration{});
}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatGL<dimensions>::compile(const Flags flags) {
return compile(Configuration{}
@ -409,8 +405,6 @@ template<UnsignedInt dimensions> FlatGL<dimensions>::FlatGL(CompileState&& state
template<UnsignedInt dimensions> FlatGL<dimensions>::FlatGL(const Configuration& configuration): FlatGL{compile(configuration)} {}
template<UnsignedInt dimensions> FlatGL<dimensions>::FlatGL(): FlatGL{Configuration{}} {}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> FlatGL<dimensions>::FlatGL(const Flags flags): FlatGL{compile(Configuration{}
.setFlags(flags))} {}

16
src/Magnum/Shaders/FlatGL.h

@ -696,13 +696,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT FlatGL: public GL::
* more information.
* @see @ref FlatGL(CompileState&&)
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
static CompileState compile(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
static CompileState compile(const Configuration& configuration);
static CompileState compile();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@ -729,13 +725,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT FlatGL: public GL::
* @brief Constructor
* @m_since_latest
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
explicit FlatGL(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
explicit FlatGL(const Configuration& configuration);
explicit FlatGL();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**

6
src/Magnum/Shaders/VectorGL.cpp

@ -167,10 +167,6 @@ template<UnsignedInt dimensions> typename VectorGL<dimensions>::CompileState Vec
};
}
template<UnsignedInt dimensions> typename VectorGL<dimensions>::CompileState VectorGL<dimensions>::compile() {
return compile(Configuration{});
}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> typename VectorGL<dimensions>::CompileState VectorGL<dimensions>::compile(const Flags flags) {
return compile(Configuration{}
@ -250,8 +246,6 @@ template<UnsignedInt dimensions> VectorGL<dimensions>::VectorGL(CompileState&& s
template<UnsignedInt dimensions> VectorGL<dimensions>::VectorGL(const Configuration& configuration): VectorGL{compile(configuration)} {}
template<UnsignedInt dimensions> VectorGL<dimensions>::VectorGL(): VectorGL{Configuration{}} {}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> VectorGL<dimensions>::VectorGL(const Flags flags): VectorGL{compile(Configuration{}
.setFlags(flags))} {}

16
src/Magnum/Shaders/VectorGL.h

@ -231,13 +231,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VectorGL: public GL
* more information.
* @see @ref VectorGL(CompileState&&)
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
static CompileState compile(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
static CompileState compile(const Configuration& configuration);
static CompileState compile();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@ -264,13 +260,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VectorGL: public GL
* @brief Constructor
* @m_since_latest
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
explicit VectorGL(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
explicit VectorGL(const Configuration& configuration);
explicit VectorGL();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**

6
src/Magnum/Shaders/VertexColorGL.cpp

@ -145,10 +145,6 @@ template<UnsignedInt dimensions> typename VertexColorGL<dimensions>::CompileStat
};
}
template<UnsignedInt dimensions> typename VertexColorGL<dimensions>::CompileState VertexColorGL<dimensions>::compile() {
return compile(Configuration{});
}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> typename VertexColorGL<dimensions>::CompileState VertexColorGL<dimensions>::compile(const Flags flags) {
return compile(Configuration{}
@ -213,8 +209,6 @@ template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(Compil
template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(const Configuration& configuration): VertexColorGL{compile(configuration)} {}
template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(): VertexColorGL{Configuration{}} {}
#ifdef MAGNUM_BUILD_DEPRECATED
template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(const Flags flags): VertexColorGL{compile(Configuration{}
.setFlags(flags))} {}

16
src/Magnum/Shaders/VertexColorGL.h

@ -224,13 +224,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColorGL: publ
* more information.
* @see @ref VertexColorGL(CompileState&&)
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
static CompileState compile(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
static CompileState compile(const Configuration& configuration);
static CompileState compile();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@ -257,13 +253,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColorGL: publ
* @brief Constructor
* @m_since_latest
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
/* Compared to the non-templated shaders like PhongGL or
MeshVisualizerGL2D using a forward declaration is fine here. Huh. */
explicit VertexColorGL(const Configuration& configuration = Configuration{});
#else
/* Configuration is forward-declared */
explicit VertexColorGL(const Configuration& configuration);
explicit VertexColorGL();
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**

Loading…
Cancel
Save