Magnum::Shaders namespace

Builtin shaders.

Contents

Collection of shaders for easy prototyping and basic usage.

This library is built if WITH_SHADERS is enabled when building Magnum. To use this library with CMake, request the Shaders component of the Magnum package and link to the Magnum::Shaders target:

find_package(Magnum REQUIRED Shaders)

# ...
target_link_libraries(your-app PRIVATE Magnum::Shaders)

See Downloading and building, Usage with CMake and Builtin shaders for more information.

Image FlatGL 2D 3D

Classes

struct DistanceFieldVectorDrawUniform new in Git master
Per-draw uniform for distance field vector shaders.
template<UnsignedInt dimensions>
class DistanceFieldVectorGL new in Git master
Distance field vector OpenGL shader.
struct DistanceFieldVectorMaterialUniform new in Git master
Material uniform for distance field vector shaders.
struct FlatDrawUniform new in Git master
Per-draw uniform for flat shaders.
template<UnsignedInt dimensions>
class FlatGL new in Git master
Flat OpenGL shader.
struct FlatMaterialUniform new in Git master
Material uniform for flat shaders.
template<UnsignedInt dimensions>
struct GenericGL new in Git master
Generic OpenGL shader definition.
struct MeshVisualizerDrawUniform2D new in Git master
Per-draw uniform for 2D mesh visualizer shaders.
struct MeshVisualizerDrawUniform3D new in Git master
Per-draw uniform for 3D mesh visualizer shaders.
class MeshVisualizerGL2D new in Git master
2D mesh visualization OpenGL shader
class MeshVisualizerGL3D new in Git master
3D mesh visualization OpenGL shader
struct MeshVisualizerMaterialUniform new in Git master
Material uniform for mesh visualizer shaders.
struct PhongDrawUniform new in Git master
Per-draw uniform for Phong shaders.
class PhongGL new in Git master
Phong OpenGL shader.
struct PhongLightUniform new in Git master
Light parameters for Phong shaders.
struct PhongMaterialUniform new in Git master
Material uniform for Phong shaders.
struct ProjectionUniform2D new in Git master
2D projection uniform common for all shaders
struct ProjectionUniform3D new in Git master
3D projection uniform common for all shaders
struct TextureTransformationUniform new in Git master
Texture transformation uniform common for all shaders.
struct TransformationProjectionUniform2D new in Git master
Combined 2D projection and transformation uniform common for all shaders.
struct TransformationProjectionUniform3D new in Git master
Combined 3D projection and transformation uniform common for all shaders.
struct TransformationUniform2D new in Git master
2D transformation uniform common for all shaders
struct TransformationUniform3D new in Git master
3D transformation uniform common for all shaders
struct VectorDrawUniform new in Git master
Per-draw uniform for vector shaders.
template<UnsignedInt dimensions>
class VectorGL new in Git master
Vector OpenGL shader.
struct VectorMaterialUniform new in Git master
Material uniform for vector shaders.
template<UnsignedInt dimensions>
class VertexColorGL new in Git master
Vertex color OpenGL shader.

Typedefs

template<UnsignedInt dimensions>
using DistanceFieldVector = DistanceFieldVectorGL<dimensions> deprecated in Git master
Distance field vector OpenGL shader.
using DistanceFieldVector2D = DistanceFieldVectorGL2D deprecated in Git master
Two-dimensional distance field vector OpenGL shader.
using DistanceFieldVector3D = DistanceFieldVectorGL3D deprecated in Git master
Three-dimensional distance field vector OpenGL shader.
using DistanceFieldVectorGL2D = DistanceFieldVectorGL<2> new in Git master
Two-dimensional distance field vector OpenGL shader.
using DistanceFieldVectorGL3D = DistanceFieldVectorGL<3> new in Git master
Three-dimensional distance field vector OpenGL shader.
template<UnsignedInt dimensions>
using Flat = FlatGL<dimensions> deprecated in Git master
Flat OpenGL shader.
using Flat2D = FlatGL2D deprecated in Git master
2D flat OpenGL shader
using Flat3D = FlatGL3D deprecated in Git master
3D flat OpenGL shader
using FlatGL2D = FlatGL<2> new in Git master
2D flat OpenGL shader
using FlatGL3D = FlatGL<3> new in Git master
3D flat OpenGL shader
using GenericGL2D = GenericGL<2> new in Git master
Generic 2D OpenGL shader definition.
using GenericGL3D = GenericGL<3> new in Git master
Generic 3D OpenGL shader definition.
template<UnsignedInt dimensions>
using Generic = GenericGL<dimensions> deprecated in Git master
Generic OpenGL shader definition.
using Generic2D = GenericGL2D deprecated in Git master
Generic 2D OpenGL shader definition.
using Generic3D = GenericGL3D deprecated in Git master
Generic 3D OpenGL shader definition.
using MeshVisualizer2D = MeshVisualizerGL2D deprecated in Git master
2D mesh visualization OpenGL shader
using MeshVisualizer3D = MeshVisualizerGL3D deprecated in Git master
3D mesh visualization OpenGL shader
using MeshVisualizer = MeshVisualizerGL3D deprecated in 2020.06
3D mesh visualization OpenGL shader
using Phong = PhongGL deprecated in Git master
Phong OpenGL shader.
template<UnsignedInt dimensions>
using Vector = VectorGL<dimensions> deprecated in Git master
Vector OpenGL shader.
using Vector2D = VectorGL2D deprecated in Git master
Two-dimensional vector OpenGL shader.
using Vector3D = VectorGL3D deprecated in Git master
Three-dimensional vector OpenGL shader.
using VectorGL2D = VectorGL<2> new in Git master
Two-dimensional vector OpenGL shader.
using VectorGL3D = VectorGL<3> new in Git master
Three-dimensional vector OpenGL shader.
template<UnsignedInt dimensions>
using VertexColor = VertexColorGL<dimensions> deprecated in Git master
Vertex color OpenGL shader.
using VertexColor2D = VertexColorGL2D deprecated in Git master
2D vertex color OpenGL shader
using VertexColor3D = VertexColorGL3D deprecated in Git master
3D vertex color OpenGL shader
using VertexColorGL2D = VertexColorGL<2> new in Git master
2D vertex color OpenGL shader
using VertexColorGL3D = VertexColorGL<3> new in Git master
3D vertex color OpenGL shader

Functions

template<UnsignedInt dimensions>
auto operator<<(Debug& debug, DistanceFieldVectorGL<dimensions>::Flag value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, DistanceFieldVectorGL<dimensions>::Flags value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, FlatGL<dimensions>::Flag value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, FlatGL<dimensions>::Flags value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, MeshVisualizerGL2D::Flag value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, MeshVisualizerGL3D::Flag value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, MeshVisualizerGL2D::Flags value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, PhongGL::Flag value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, VectorGL<dimensions>::Flag value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, VectorGL<dimensions>::Flags value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, VertexColorGL<dimensions>::Flag value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto operator<<(Debug& debug, VertexColorGL<dimensions>::Flags value) -> Debug&
Debug output operator.

Typedef documentation

template<UnsignedInt dimensions>
using Magnum::Shaders::DistanceFieldVector = DistanceFieldVectorGL<dimensions>

Distance field vector OpenGL shader.

typedef DistanceFieldVectorGL2D Magnum::Shaders::DistanceFieldVector2D

Two-dimensional distance field vector OpenGL shader.

typedef DistanceFieldVectorGL3D Magnum::Shaders::DistanceFieldVector3D

Three-dimensional distance field vector OpenGL shader.

typedef DistanceFieldVectorGL<2> Magnum::Shaders::DistanceFieldVectorGL2D new in Git master

Two-dimensional distance field vector OpenGL shader.

typedef DistanceFieldVectorGL<3> Magnum::Shaders::DistanceFieldVectorGL3D new in Git master

Three-dimensional distance field vector OpenGL shader.

template<UnsignedInt dimensions>
using Magnum::Shaders::Flat = FlatGL<dimensions>

Flat OpenGL shader.

typedef FlatGL2D Magnum::Shaders::Flat2D

2D flat OpenGL shader

typedef FlatGL3D Magnum::Shaders::Flat3D

3D flat OpenGL shader

typedef FlatGL<2> Magnum::Shaders::FlatGL2D new in Git master

2D flat OpenGL shader

typedef FlatGL<3> Magnum::Shaders::FlatGL3D new in Git master

3D flat OpenGL shader

typedef GenericGL<2> Magnum::Shaders::GenericGL2D new in Git master

Generic 2D OpenGL shader definition.

typedef GenericGL<3> Magnum::Shaders::GenericGL3D new in Git master

Generic 3D OpenGL shader definition.

template<UnsignedInt dimensions>
using Magnum::Shaders::Generic = GenericGL<dimensions>

Generic OpenGL shader definition.

typedef GenericGL2D Magnum::Shaders::Generic2D

Generic 2D OpenGL shader definition.

typedef GenericGL3D Magnum::Shaders::Generic3D

Generic 3D OpenGL shader definition.

typedef MeshVisualizerGL2D Magnum::Shaders::MeshVisualizer2D

2D mesh visualization OpenGL shader

typedef MeshVisualizerGL3D Magnum::Shaders::MeshVisualizer3D

3D mesh visualization OpenGL shader

typedef MeshVisualizerGL3D Magnum::Shaders::MeshVisualizer

3D mesh visualization OpenGL shader

typedef PhongGL Magnum::Shaders::Phong

Phong OpenGL shader.

template<UnsignedInt dimensions>
using Magnum::Shaders::Vector = VectorGL<dimensions>

Vector OpenGL shader.

typedef VectorGL2D Magnum::Shaders::Vector2D

Two-dimensional vector OpenGL shader.

typedef VectorGL3D Magnum::Shaders::Vector3D

Three-dimensional vector OpenGL shader.

typedef VectorGL<2> Magnum::Shaders::VectorGL2D new in Git master

Two-dimensional vector OpenGL shader.

typedef VectorGL<3> Magnum::Shaders::VectorGL3D new in Git master

Three-dimensional vector OpenGL shader.

template<UnsignedInt dimensions>
using Magnum::Shaders::VertexColor = VertexColorGL<dimensions>

Vertex color OpenGL shader.

typedef VertexColorGL2D Magnum::Shaders::VertexColor2D

2D vertex color OpenGL shader

typedef VertexColorGL3D Magnum::Shaders::VertexColor3D

3D vertex color OpenGL shader

typedef VertexColorGL<2> Magnum::Shaders::VertexColorGL2D new in Git master

2D vertex color OpenGL shader

typedef VertexColorGL<3> Magnum::Shaders::VertexColorGL3D new in Git master

3D vertex color OpenGL shader

Function documentation

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, DistanceFieldVectorGL<dimensions>::Flag value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, DistanceFieldVectorGL<dimensions>::Flags value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, FlatGL<dimensions>::Flag value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, FlatGL<dimensions>::Flags value)

Debug output operator.

Debug& Magnum::Shaders::operator<<(Debug& debug, MeshVisualizerGL2D::Flag value)

Debug output operator.

Debug& Magnum::Shaders::operator<<(Debug& debug, MeshVisualizerGL3D::Flag value)

Debug output operator.

Debug& Magnum::Shaders::operator<<(Debug& debug, PhongGL::Flag value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, VectorGL<dimensions>::Flag value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, VectorGL<dimensions>::Flags value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, VertexColorGL<dimensions>::Flag value)

Debug output operator.

template<UnsignedInt dimensions>
Debug& Magnum::Shaders::operator<<(Debug& debug, VertexColorGL<dimensions>::Flags value)

Debug output operator.