Browse Source

Shaders: drop nasty workarounds for Clang 3.8.

The minimum Clang version got bumped to 6 almost half a year ago in
5e3b610613 so these are not needed
anymore. More burning code!
pull/610/head
Vladimír Vondruš 4 years ago
parent
commit
40593113f6
  1. 84
      src/Magnum/Shaders/DistanceFieldVector.h
  2. 62
      src/Magnum/Shaders/Flat.h
  3. 12
      src/Magnum/Shaders/Generic.h
  4. 95
      src/Magnum/Shaders/MeshVisualizer.h
  5. 78
      src/Magnum/Shaders/Phong.h
  6. 71
      src/Magnum/Shaders/Vector.h

84
src/Magnum/Shaders/DistanceFieldVector.h

@ -55,18 +55,7 @@ be shared among multiple draw calls and thus are provided in a separate
*/
struct DistanceFieldVectorDrawUniform {
/** @brief Construct with default parameters */
constexpr explicit DistanceFieldVectorDrawUniform(DefaultInitT = DefaultInit) noexcept:
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
materialId{0}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
#ifndef CORRADE_TARGET_BIG_ENDIAN
, _pad0{}
#endif
, _pad1{}, _pad2{}, _pad3{}
#endif
{}
constexpr explicit DistanceFieldVectorDrawUniform(DefaultInitT = DefaultInit) noexcept: materialId{0} {}
/** @brief Construct without initializing the contents */
explicit DistanceFieldVectorDrawUniform(NoInitT) noexcept {}
@ -113,39 +102,19 @@ struct DistanceFieldVectorDrawUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
#endif
#else
alignas(4) UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
alignas(4) UnsignedShort:16; /* reserved for skinOffset */
UnsignedShort materialId;
#endif
/* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for objectId */
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32; /* reserved for objectId */
Int:32;
Int:32;
#endif
};
@ -159,16 +128,7 @@ Describes material properties referenced from
*/
struct DistanceFieldVectorMaterialUniform {
/** @brief Construct with default parameters */
constexpr explicit DistanceFieldVectorMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f},
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
/* Otherwise it refuses to constexpr, on 3.8 at least */
_pad0{}, _pad1{}, _pad2{}, _pad3{},
#endif
outlineColor{0.0f, 0.0f, 0.0f, 0.0f}, outlineStart{0.5f}, outlineEnd{1.0f}, smoothness{0.04f}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad4{}
#endif
{}
constexpr explicit DistanceFieldVectorMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, outlineColor{0.0f, 0.0f, 0.0f, 0.0f}, outlineStart{0.5f}, outlineEnd{1.0f}, smoothness{0.04f} {}
/** @brief Construct without initializing the contents */
explicit DistanceFieldVectorMaterialUniform(NoInitT) noexcept: color{NoInit}, outlineColor{NoInit} {}
@ -234,26 +194,10 @@ struct DistanceFieldVectorMaterialUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for backgroundColor */
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32; /* reserved for backgroundColor */
Int:32;
Int:32;
Int:32;
#endif
/**
@ -298,11 +242,7 @@ struct DistanceFieldVectorMaterialUniform {
/* warning: Member __pad4__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad4 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
#endif
};

62
src/Magnum/Shaders/Flat.h

@ -54,19 +54,7 @@ be shared among multiple draw calls and thus are provided in a separate
*/
struct FlatDrawUniform {
/** @brief Construct with default parameters */
constexpr explicit FlatDrawUniform(DefaultInitT = DefaultInit) noexcept:
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
materialId{0},
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) && !defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{},
#endif
objectId{0}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad1{}, _pad2{}
#endif
{}
constexpr explicit FlatDrawUniform(DefaultInitT = DefaultInit) noexcept: materialId{0}, objectId{0} {}
/** @brief Construct without initializing the contents */
explicit FlatDrawUniform(NoInitT) noexcept {}
@ -121,18 +109,10 @@ struct FlatDrawUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
#endif
#else
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
UnsignedShort materialId;
#endif
@ -154,16 +134,8 @@ struct FlatDrawUniform {
/* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
Int:32;
#endif
};
@ -177,11 +149,7 @@ Describes material properties referenced from
*/
struct FlatMaterialUniform {
/** @brief Construct with default parameters */
constexpr explicit FlatMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, alphaMask{0.5f}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad0{}, _pad1{}, _pad2{}
#endif
{}
constexpr explicit FlatMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, alphaMask{0.5f} {}
/** @brief Construct without initializing the contents */
explicit FlatMaterialUniform(NoInitT) noexcept: color{NoInit} {}
@ -243,21 +211,9 @@ struct FlatMaterialUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
Int:32;
Int:32;
#endif
};

12
src/Magnum/Shaders/Generic.h

@ -374,11 +374,7 @@ Used only if @ref DistanceFieldVectorGL::Flag::TextureTransformation,
*/
struct TextureTransformationUniform {
/** @brief Construct with default parameters */
constexpr explicit TextureTransformationUniform(DefaultInitT = DefaultInit) noexcept: rotationScaling{Math::IdentityInit}, offset{0.0f, 0.0f}, layer{0}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad0{} /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
{}
constexpr explicit TextureTransformationUniform(DefaultInitT = DefaultInit) noexcept: rotationScaling{Math::IdentityInit}, offset{0.0f, 0.0f}, layer{0} {}
/** @brief Construct without initializing the contents */
explicit TextureTransformationUniform(NoInitT) noexcept: rotationScaling{NoInit}, offset{NoInit} {}
@ -476,11 +472,7 @@ struct TextureTransformationUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for coordinateSet */
Int:32; /* reserved for coordinateSet */
#endif
};

95
src/Magnum/Shaders/MeshVisualizer.h

@ -54,19 +54,7 @@ separate @ref MeshVisualizerMaterialUniform structure, referenced by
*/
struct MeshVisualizerDrawUniform2D {
/** @brief Construct with default parameters */
constexpr explicit MeshVisualizerDrawUniform2D(DefaultInitT = DefaultInit) noexcept:
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
materialId{0}
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && !defined(CORRADE_TARGET_BIG_ENDIAN)
, _pad0{}
#endif
, objectId{0}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad1{}, _pad2{}
#endif
{}
constexpr explicit MeshVisualizerDrawUniform2D(DefaultInitT = DefaultInit) noexcept: materialId{0}, objectId{0} {}
/** @brief Construct without initializing the contents */
explicit MeshVisualizerDrawUniform2D(NoInitT) noexcept {}
@ -122,18 +110,10 @@ struct MeshVisualizerDrawUniform2D {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
#endif
#else
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
UnsignedShort materialId;
#endif
@ -155,16 +135,8 @@ struct MeshVisualizerDrawUniform2D {
/* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
Int:32;
#endif
};
@ -180,19 +152,7 @@ shared among multiple draw calls and thus are provided in a separate
*/
struct MeshVisualizerDrawUniform3D {
/** @brief Construct with default parameters */
constexpr explicit MeshVisualizerDrawUniform3D(DefaultInitT = DefaultInit) noexcept: normalMatrix{Math::IdentityInit}
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN)
, _pad0{} /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
, materialId{0}
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && !defined(CORRADE_TARGET_BIG_ENDIAN)
, _pad0{}
#endif
, objectId{0}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad1{}, _pad2{}
#endif
{}
constexpr explicit MeshVisualizerDrawUniform3D(DefaultInitT = DefaultInit) noexcept: normalMatrix{Math::IdentityInit}, materialId{0}, objectId{0} {}
/** @brief Construct without initializing the contents */
explicit MeshVisualizerDrawUniform3D(NoInitT) noexcept: normalMatrix{NoInit} {}
@ -267,18 +227,10 @@ struct MeshVisualizerDrawUniform3D {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
#endif
#else
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
UnsignedShort materialId;
#endif
@ -300,16 +252,8 @@ struct MeshVisualizerDrawUniform3D {
/* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
Int:32;
#endif
};
@ -323,12 +267,7 @@ Describes material properties referenced from
*/
struct MeshVisualizerMaterialUniform {
/** @brief Construct with default parameters */
constexpr explicit MeshVisualizerMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, wireframeColor{0.0f, 0.0f, 0.0f, 1.0f}, wireframeWidth{1.0f}, colorMapOffset{1.0f/512.0f}, colorMapScale{1.0f/256.0f}, lineWidth{1.0f}, lineLength{1.0f}, smoothness{2.0f}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
/* Otherwise it refuses to constexpr, on 3.8 at least */
, _pad0{}, _pad1{}
#endif
{}
constexpr explicit MeshVisualizerMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, wireframeColor{0.0f, 0.0f, 0.0f, 1.0f}, wireframeWidth{1.0f}, colorMapOffset{1.0f/512.0f}, colorMapScale{1.0f/256.0f}, lineWidth{1.0f}, lineLength{1.0f}, smoothness{2.0f} {}
/** @brief Construct without initializing the contents */
explicit MeshVisualizerMaterialUniform(NoInitT) noexcept: color{NoInit}, wireframeColor{NoInit} {}
@ -540,16 +479,8 @@ struct MeshVisualizerMaterialUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
Int:32;
#endif
};

78
src/Magnum/Shaders/Phong.h

@ -55,15 +55,7 @@ separate @ref PhongMaterialUniform structure, referenced by @ref materialId.
*/
struct PhongDrawUniform {
/** @brief Construct with default parameters */
constexpr explicit PhongDrawUniform(DefaultInitT = DefaultInit) noexcept: normalMatrix{Math::IdentityInit},
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
materialId{0},
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) && !defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{},
#endif
objectId{0}, lightOffset{0}, lightCount{0xffffffffu} {}
constexpr explicit PhongDrawUniform(DefaultInitT = DefaultInit) noexcept: normalMatrix{Math::IdentityInit}, materialId{0}, objectId{0}, lightOffset{0}, lightCount{0xffffffffu} {}
/** @brief Construct without initializing the contents */
explicit PhongDrawUniform(NoInitT) noexcept: normalMatrix{NoInit} {}
@ -153,18 +145,10 @@ struct PhongDrawUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
#endif
#else
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
UnsignedShort materialId;
#endif
@ -220,11 +204,7 @@ Describes material properties referenced from
*/
struct PhongMaterialUniform {
/** @brief Construct with default parameters */
constexpr explicit PhongMaterialUniform(DefaultInitT = DefaultInit) noexcept: ambientColor{0.0f, 0.0f, 0.0f, 0.0f}, diffuseColor{1.0f, 1.0f, 1.0f, 1.0f}, specularColor{1.0f, 1.0f, 1.0f, 0.0f}, normalTextureScale{1.0f}, shininess{80.0f}, alphaMask{0.5f}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad0{} /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
{}
constexpr explicit PhongMaterialUniform(DefaultInitT = DefaultInit) noexcept: ambientColor{0.0f, 0.0f, 0.0f, 0.0f}, diffuseColor{1.0f, 1.0f, 1.0f, 1.0f}, specularColor{1.0f, 1.0f, 1.0f, 0.0f}, normalTextureScale{1.0f}, shininess{80.0f}, alphaMask{0.5f} {}
/** @brief Construct without initializing the contents */
explicit PhongMaterialUniform(NoInitT) noexcept: ambientColor{NoInit}, diffuseColor{NoInit}, specularColor{NoInit} {}
@ -374,11 +354,7 @@ struct PhongMaterialUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32;
#endif
};
@ -394,19 +370,7 @@ if @ref PhongGL::Flag::LightCulling is enabled.
*/
struct PhongLightUniform {
/** @brief Construct with default parameters */
constexpr explicit PhongLightUniform(DefaultInitT = DefaultInit) noexcept: position{0.0f, 0.0f, 1.0f, 0.0f}, color{1.0f, 1.0f, 1.0f},
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
specularColor{1.0f, 1.0f, 1.0f},
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1{},
#endif
range{Constants::inf()}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
, _pad2{}, _pad3{}, _pad4{}
#endif
{}
constexpr explicit PhongLightUniform(DefaultInitT = DefaultInit) noexcept: position{0.0f, 0.0f, 1.0f, 0.0f}, color{1.0f, 1.0f, 1.0f}, specularColor{1.0f, 1.0f, 1.0f}, range{Constants::inf()} {}
/** @brief Construct without initializing the contents */
explicit PhongLightUniform(NoInitT) noexcept: position{NoInit}, color{NoInit}, specularColor{NoInit} {}
@ -483,11 +447,7 @@ struct PhongLightUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for cone inner angle */
Int:32; /* reserved for cone inner angle */
#endif
/**
@ -503,11 +463,7 @@ struct PhongLightUniform {
/* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for cone outer angle */
Int:32; /* reserved for cone outer angle */
#endif
/**
@ -521,21 +477,9 @@ struct PhongLightUniform {
/* warning: Member __pad2__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for cone direction */
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad4 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32; /* reserved for cone direction */
Int:32;
Int:32;
#endif
};

71
src/Magnum/Shaders/Vector.h

@ -54,15 +54,7 @@ be shared among multiple draw calls and thus are provided in a separate
*/
struct VectorDrawUniform {
/** @brief Construct with default parameters */
constexpr explicit VectorDrawUniform(DefaultInitT = DefaultInit) noexcept:
#if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN)
_pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
materialId{0}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) && !defined(CORRADE_TARGET_BIG_ENDIAN)
, _pad0{}, _pad1{}, _pad2{}, _pad3{}
#endif
{}
constexpr explicit VectorDrawUniform(DefaultInitT = DefaultInit) noexcept: materialId{0} {}
/** @brief Construct without initializing the contents */
explicit VectorDrawUniform(NoInitT) noexcept {}
@ -108,39 +100,19 @@ struct VectorDrawUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
UnsignedShort:16; /* reserved for skinOffset */
#endif
#else
alignas(4) UnsignedShort
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:16; /* reserved for skinOffset */
alignas(4) UnsignedShort:16; /* reserved for skinOffset */
UnsignedShort materialId;
#endif
/* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for objectId */
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32; /* reserved for objectId */
Int:32;
Int:32;
#endif
};
@ -154,12 +126,7 @@ Describes material properties referenced from
*/
struct VectorMaterialUniform {
/** @brief Construct with default parameters */
constexpr explicit VectorMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, backgroundColor{0.0f, 0.0f, 0.0f, 0.0f}
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
/* Otherwise it refuses to constexpr, on 3.8 at least */
, _pad0{}, _pad1{}, _pad2{}, _pad3{}
#endif
{}
constexpr explicit VectorMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, backgroundColor{0.0f, 0.0f, 0.0f, 0.0f} {}
/** @brief Construct without initializing the contents */
explicit VectorMaterialUniform(NoInitT) noexcept: color{NoInit}, backgroundColor{NoInit} {}
@ -214,26 +181,10 @@ struct VectorMaterialUniform {
/* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK
I MADE THOSE UNNAMED, YOU DUMB FOOL */
#ifndef DOXYGEN_GENERATING_OUTPUT
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32; /* reserved for alpha mask */
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int
#if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)
_pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */
#endif
:32;
Int:32; /* reserved for alpha mask */
Int:32;
Int:32;
Int:32;
#endif
};

Loading…
Cancel
Save