This is a snapshot of a work-in-progress documentation theme. If you feel lost, miss something, or want to see the original Doxygen docs instead, head over to the archived version of this documentation page.

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
Vertex color.
using Position = Attribute<0, T>
Vertex position.
using TextureCoordinates = Attribute<1, Vector2>
2D texture coordinates
using Normal = Attribute<2, Vector3>
Vertex normal.

Typedef documentation

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

Vertex position.

Vector2 in 2D and Vector3 in 3D.

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

2D texture coordinates

Vector2.

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

Vertex normal.

Vector3, defined only in 3D.