|
Turbo Engine 0.3
A C++ game engine using Allegro 5
|
A single, typed shader uniform value. More...
#include <Uniform.hpp>
Public Types | |
| enum class | Type { Float , Int , Bool , Vec2 , Vec3 , Vec4 , Sampler } |
Static Public Member Functions | |
| static UniformValue | Float (float v) |
| static UniformValue | Int (int v) |
| static UniformValue | Bool (bool v) |
| static UniformValue | Vec2 (float x, float y) |
| static UniformValue | Vec3 (float x, float y, float z) |
| static UniformValue | Vec4 (float x, float y, float z, float w) |
| static UniformValue | Sampler (Texture *t, int unit) |
Public Attributes | |
| Type | type = Type::Float |
| float | f [4] = {0.0f, 0.0f, 0.0f, 0.0f} |
| int | i = 0 |
| bool | b = false |
| Texture * | sampler = nullptr |
| int | sampler_unit = 0 |
A single, typed shader uniform value.
Materials store these so uniform values can be set at any time (and later edited from an inspector UI) and pushed to the GPU only at bind time.
|
strong |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| bool turbo::UniformValue::b = false |
| float turbo::UniformValue::f[4] = {0.0f, 0.0f, 0.0f, 0.0f} |
| int turbo::UniformValue::i = 0 |
| Texture* turbo::UniformValue::sampler = nullptr |
| int turbo::UniformValue::sampler_unit = 0 |
| Type turbo::UniformValue::type = Type::Float |