#include <Shader.hpp>
|
| Shader (string const &name) |
|
| ~Shader () |
|
void | use () |
|
GLint | uniform (string const &name) |
|
GLint | uniformBlock (string const &name) |
|
void | uniform (string const &name, mat4 const *values, size_t const size) |
|
void | uniform (string const &name, mat4 const &value) |
|
void | uniform (string const &name, mat3 const &value) |
|
void | uniform (string const &name, vec4 const &value) |
|
void | uniform (string const &name, vec3 const &value) |
|
void | uniform (string const &name, vec2 const &value) |
|
void | uniform (string const &name, float value) |
|
void | uniform (string const &name, int value) |
|
void | uniform (string const &name, uint value) |
|
void | uniform (string const &name, uint16 value) |
|
Shader represents a shader-program of OpenGL
Definition at line 8 of file Shader.hpp.
Constructs a Shader-object. Vertex- and fragment-shader are loaded from files (i.e. "content\\shaders\\" + name + ".vert").
- Parameters
-
name | The name of the shader |
Definition at line 4 of file Shader.cpp.
Destructs a Shader-object
Definition at line 28 of file Shader.cpp.
Links all loaded shaders to a shader-program
Definition at line 88 of file Shader.cpp.
int loadShader |
( |
string const & |
file, |
|
|
GLenum |
shaderType |
|
) |
| |
|
private |
Loads a shader from a file and compiles it.
- Parameters
-
file | The filename |
shaderType | the type of the shader |
- Returns
- The shader-id
Definition at line 34 of file Shader.cpp.
GLint uniform |
( |
string const & |
name | ) |
|
Returns the position for the given uniform.
- Parameters
-
- Returns
- The position
Definition at line 115 of file Shader.cpp.
void uniform |
( |
string const & |
name, |
|
|
mat4 const * |
values, |
|
|
size_t const |
size |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
values | A pointer to an array to mat4 |
size | The number of elements read from the array |
Definition at line 50 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
mat4 const & |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 57 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
mat3 const & |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 63 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
vec4 const & |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 69 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
vec3 const & |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 75 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
vec2 const & |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 81 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
float |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 87 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
int |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 93 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
uint |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 99 of file Shader.hpp.
void uniform |
( |
string const & |
name, |
|
|
uint16 |
value |
|
) |
| |
|
inline |
Set a uniform to the given value
- Parameters
-
name | The uniform-name |
value | The new value for the uniform |
Definition at line 105 of file Shader.hpp.
GLint uniformBlock |
( |
string const & |
name | ) |
|
Returns the position for the given uniform-block.
- Parameters
-
name | The uniform-block-name |
- Returns
- The position
Definition at line 125 of file Shader.cpp.
Activates this shader-object
Definition at line 111 of file Shader.cpp.
The layout-location for boneId-attributes
Definition at line 125 of file Shader.hpp.
const uint boneWeight = 4 |
|
static |
The layout-location for boneWeight-attributes
Definition at line 126 of file Shader.hpp.
map<string,GLint> m_uniforms |
|
private |
Uniform-positions by their name
Definition at line 12 of file Shader.hpp.
The layout-location for normal-attributes
Definition at line 123 of file Shader.hpp.
The layout-location for position-attributes
Definition at line 122 of file Shader.hpp.
The layout-location for uv-attributes
Definition at line 124 of file Shader.hpp.
The documentation for this class was generated from the following files: