template<UnsignedInt dimensions>
Magnum::Shaders::Generic struct

Generic shader definition.

Contents

Definitions common for majority of shaders in Shaders namespace, allowing mesh configured for the generic shader to be used with any of them. See Generic vertex attributes for more information.

Public types

struct Color deprecated
Vertex color.
using Position = GL::Attribute<0, T>
Vertex position.
using TextureCoordinates = GL::Attribute<1, Vector2>
2D texture coordinates
using Normal = GL::Attribute<2, Vector3>
Vertex normal.
using Color3 = GL::Attribute<3, Magnum::Color3>
Three-component vertex color.
using Color4 = GL::Attribute<3, Magnum::Color4>
Four-component vertex color.

Typedef documentation

template<UnsignedInt dimensions>
typedef GL::Attribute<0, T> Magnum::Shaders::Generic<dimensions>::Position

Vertex position.

Vector2 in 2D and Vector3 in 3D.

template<UnsignedInt dimensions>
typedef GL::Attribute<1, Vector2> Magnum::Shaders::Generic<dimensions>::TextureCoordinates

2D texture coordinates

Vector2.

template<UnsignedInt dimensions>
typedef GL::Attribute<2, Vector3> Magnum::Shaders::Generic<dimensions>::Normal

Vertex normal.

Vector3, defined only in 3D.

template<UnsignedInt dimensions>
typedef GL::Attribute<3, Magnum::Color3> Magnum::Shaders::Generic<dimensions>::Color3

Three-component vertex color.

Magnum::Color3. Use either this or the Color4 attribute.

template<UnsignedInt dimensions>
typedef GL::Attribute<3, Magnum::Color4> Magnum::Shaders::Generic<dimensions>::Color4

Four-component vertex color.

Magnum::Color4. Use either this or the Color3 attribute.