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

Generic shader definition.

Contents

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

Public types

struct Color deprecated
Vertex color.
enum (anonymous): UnsignedInt { ColorOutput = 0, ObjectIdOutput = 1 }
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 Tangent = GL::Attribute<4, Vector3>
Vertex tangent.
using Color3 = GL::Attribute<3, Magnum::Color3>
Three-component vertex color.
using Color4 = GL::Attribute<3, Magnum::Color4>
Four-component vertex color.

Enum documentation

template<UnsignedInt dimensions>
enum Magnum::Shaders::Generic<dimensions>::(anonymous): UnsignedInt

Enumerators
ColorOutput

Color shader output. Present always, expects three- or four-component floating-point or normalized buffer attachment.

ObjectIdOutput

Object ID shader output. Expects a single-component unsigned integral attachment.

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<4, Vector3> Magnum::Shaders::Generic<dimensions>::Tangent

Vertex tangent.

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.