Browse Source

Move VertexColorGL impls from header

pull/576/head
Vladislav Oleshko 4 years ago
parent
commit
b5da1e2abc
  1. 14
      src/Magnum/Shaders/VertexColorGL.cpp
  2. 11
      src/Magnum/Shaders/VertexColorGL.h

14
src/Magnum/Shaders/VertexColorGL.cpp

@ -193,6 +193,20 @@ template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(Compil
static_cast<void>(version);
}
template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(Flags flags): VertexColorGL{compile(flags)} {}
#ifndef MAGNUM_TARGET_GLES2
template<UnsignedInt dimensions> typename VertexColorGL<dimensions>::CompileState VertexColorGL<dimensions>::compile(Flags flags) {
return compile(flags, 1);
}
template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(Flags flags, UnsignedInt drawCount)
: VertexColorGL{compile(flags, drawCount)} {}
#endif
template<UnsignedInt dimensions> VertexColorGL<dimensions>::VertexColorGL(NoInitT) {}
template<UnsignedInt dimensions> VertexColorGL<dimensions>& VertexColorGL<dimensions>::setTransformationProjectionMatrix(const MatrixTypeFor<dimensions, Float>& matrix) {
#ifndef MAGNUM_TARGET_GLES2
CORRADE_ASSERT(!(_flags >= Flag::UniformBuffers),

11
src/Magnum/Shaders/VertexColorGL.h

@ -217,7 +217,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColorGL: publ
* @ref VertexColorGL(Flags, UnsignedInt) with @p drawCount set to
* @cpp 1 @ce.
*/
explicit VertexColorGL(Flags flags = {}): VertexColorGL{compile(flags)} {}
explicit VertexColorGL(Flags flags = {});
#ifndef MAGNUM_TARGET_GLES2
/**
@ -248,8 +248,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColorGL: publ
for this might be too confusing); what if some parameters won't be
(unsigned) integers? like a string with shader extensions? make a
whole Configuration class? */
explicit VertexColorGL(Flags flags, UnsignedInt drawCount):
VertexColorGL{compile(flags, drawCount)} {}
explicit VertexColorGL(Flags flags, UnsignedInt drawCount);
#endif
/**
@ -277,9 +276,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColorGL: publ
);
#ifndef MAGNUM_TARGET_GLES2
static CompileState compile(Flags flags) {
return compile(flags, 1);
}
static CompileState compile(Flags flags);
#endif
/** @brief Copying is not allowed */
@ -424,7 +421,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColorGL: publ
#endif
private:
explicit VertexColorGL(NoInitT) {}
explicit VertexColorGL(NoInitT);
/* Prevent accidentally calling irrelevant functions */
#ifndef MAGNUM_TARGET_GLES

Loading…
Cancel
Save