sgltk 0.6
Simple OpenGL Tool Kit
|
Manager shaders. More...
#include <shader.h>
Public Member Functions | |
bool | attach_file (const std::string &filename, GLenum type) |
Compiles and attaches shader files. | |
bool | attach_string (const std::string &shader_string, GLenum type) |
Compiles and attaches shader strings. | |
void | set_transform_feedback_variables (std::vector< std::string > &variables, GLenum buffer_mode) |
Sets the variable to record in transform feedback buffers. | |
void | recompile () |
Reads, compiles and links all associated shaders again. | |
bool | link () |
Links the attached shaders. | |
void | bind () |
Binds the shader and stores the previously bound shader. | |
void | unbind () |
Unbinds the shader and restores the previously bound shader. | |
int | get_attribute_location (const std::string &name) |
Returns the location of an attribute variable. | |
int | get_uniform_location (const std::string &name) |
Returns the location of a uniform variable. | |
template<typename T> | |
void | set_uniform (int location, T v0) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (const std::string &name, T v0) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (int location, T v0, T v1) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (const std::string &name, T v0, T v1) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (int location, T v0, T v1, T v2) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (const std::string &name, T v0, T v1, T v2) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (int location, T v0, T v1, T v2, T v3) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (const std::string &name, T v0, T v1, T v2, T v3) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (int location, unsigned int count, unsigned int elements, const T *value) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int elements, const T *value) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (int location, unsigned int count, unsigned int columns, unsigned int rows, bool transpose, const T *value) |
Sets the uniform. | |
template<typename T> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int columns, unsigned int rows, bool transpose, const T *value) |
Sets the uniform. | |
void | set_uniform (int location, const glm::vec2 &value) |
Sets the uniform. | |
void | set_uniform (int location, const glm::dvec2 &value) |
Sets the uniform. | |
void | set_uniform (int location, const glm::vec3 &value) |
Sets the uniform. | |
void | set_uniform (int location, const glm::dvec3 &value) |
Sets the uniform. | |
void | set_uniform (int location, const glm::vec4 &value) |
Sets the uniform. | |
void | set_uniform (int location, const glm::dvec4 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const glm::vec2 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const glm::dvec2 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const glm::vec3 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const glm::dvec3 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const glm::vec4 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const glm::dvec4 &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const glm::mat2 &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const glm::dmat2 &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const glm::mat3 &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const glm::dmat3 &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const glm::mat4 &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const glm::dmat4 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const glm::mat2 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const glm::dmat2 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const glm::mat3 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const glm::dmat3 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const glm::mat4 &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const glm::dmat4 &value) |
Sets the uniform. | |
void | set_uniform (int location, const std::vector< glm::vec2 > &value) |
Sets the uniform. | |
void | set_uniform (int location, const std::vector< glm::dvec2 > &value) |
Sets the uniform. | |
void | set_uniform (int location, const std::vector< glm::vec3 > &value) |
Sets the uniform. | |
void | set_uniform (int location, const std::vector< glm::dvec3 > &value) |
Sets the uniform. | |
void | set_uniform (int location, const std::vector< glm::vec4 > &value) |
Sets the uniform. | |
void | set_uniform (int location, const std::vector< glm::dvec4 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const std::vector< glm::vec2 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const std::vector< glm::dvec2 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const std::vector< glm::vec3 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const std::vector< glm::dvec3 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const std::vector< glm::vec4 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, const std::vector< glm::dvec4 > &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const std::vector< glm::mat2 > &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const std::vector< glm::dmat2 > &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const std::vector< glm::mat3 > &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const std::vector< glm::dmat3 > &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const std::vector< glm::mat4 > &value) |
Sets the uniform. | |
void | set_uniform (int location, bool transpose, const std::vector< glm::dmat4 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const std::vector< glm::mat2 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const std::vector< glm::dmat2 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const std::vector< glm::mat3 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const std::vector< glm::dmat3 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const std::vector< glm::mat4 > &value) |
Sets the uniform. | |
void | set_uniform (const std::string &name, bool transpose, const std::vector< glm::dmat4 > &value) |
Sets the uniform. | |
template<> | |
void | set_uniform (int location, int v0) |
template<> | |
void | set_uniform (int location, unsigned int v0) |
template<> | |
void | set_uniform (int location, float v0) |
template<> | |
void | set_uniform (int location, double v0) |
template<> | |
void | set_uniform (const std::string &name, int v0) |
template<> | |
void | set_uniform (const std::string &name, unsigned int v0) |
template<> | |
void | set_uniform (const std::string &name, float v0) |
template<> | |
void | set_uniform (const std::string &name, double v0) |
template<> | |
void | set_uniform (int location, int v0, int v1) |
template<> | |
void | set_uniform (int location, unsigned int v0, unsigned int v1) |
template<> | |
void | set_uniform (int location, float v0, float v1) |
template<> | |
void | set_uniform (int location, double v0, double v1) |
template<> | |
void | set_uniform (const std::string &name, int v0, int v1) |
template<> | |
void | set_uniform (const std::string &name, unsigned int v0, unsigned int v1) |
template<> | |
void | set_uniform (const std::string &name, float v0, float v1) |
template<> | |
void | set_uniform (const std::string &name, double v0, double v1) |
template<> | |
void | set_uniform (int location, int v0, int v1, int v2) |
template<> | |
void | set_uniform (int location, unsigned int v0, unsigned int v1, unsigned int v2) |
template<> | |
void | set_uniform (int location, float v0, float v1, float v2) |
template<> | |
void | set_uniform (int location, double v0, double v1, double v2) |
template<> | |
void | set_uniform (const std::string &name, int v0, int v1, int v2) |
template<> | |
void | set_uniform (const std::string &name, unsigned int v0, unsigned int v1, unsigned int v2) |
template<> | |
void | set_uniform (const std::string &name, float v0, float v1, float v2) |
template<> | |
void | set_uniform (const std::string &name, double v0, double v1, double v2) |
template<> | |
void | set_uniform (int location, int v0, int v1, int v2, int v3) |
template<> | |
void | set_uniform (int location, unsigned int v0, unsigned int v1, unsigned int v2, unsigned int v3) |
template<> | |
void | set_uniform (int location, float v0, float v1, float v2, float v3) |
template<> | |
void | set_uniform (int location, double v0, double v1, double v2, double v3) |
template<> | |
void | set_uniform (const std::string &name, int v0, int v1, int v2, int v3) |
template<> | |
void | set_uniform (const std::string &name, unsigned int v0, unsigned int v1, unsigned int v2, unsigned int v3) |
template<> | |
void | set_uniform (const std::string &name, float v0, float v1, float v2, float v3) |
template<> | |
void | set_uniform (const std::string &name, double v0, double v1, double v2, double v3) |
template<> | |
void | set_uniform (int location, unsigned int count, unsigned int elements, const int *value) |
template<> | |
void | set_uniform (int location, unsigned int count, unsigned int elements, const unsigned int *value) |
template<> | |
void | set_uniform (int location, unsigned int count, unsigned int elements, const float *value) |
template<> | |
void | set_uniform (int location, unsigned int count, unsigned int elements, const double *value) |
template<> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int elements, const int *value) |
template<> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int elements, const unsigned int *value) |
template<> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int elements, const float *value) |
template<> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int elements, const double *value) |
template<> | |
void | set_uniform (int location, unsigned int count, unsigned int columns, unsigned int rows, bool transpose, const float *value) |
template<> | |
void | set_uniform (int location, unsigned int count, unsigned int columns, unsigned int rows, bool transpose, const double *value) |
template<> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int columns, unsigned int rows, bool transpose, const float *value) |
template<> | |
void | set_uniform (const std::string &name, unsigned int count, unsigned int columns, unsigned int rows, bool transpose, const double *value) |
Static Public Member Functions | |
static void | add_path (std::string path) |
Adds a path to the list of paths to be searched ▸ for image files. |
Public Attributes | |
bool | transform_feedback |
True if the shader records values into transform feedback buffer(s) | |
GLuint | program |
Shader name. |
Shader::Shader | ( | ) |
Definition at line 17 of file shader.cpp.
Shader::~Shader | ( | ) |
Definition at line 36 of file shader.cpp.
|
static |
Adds a path to the list of paths to be searched ▸ for image files.
path | The path to add to the list |
Definition at line 9 of file shader.cpp.
bool Shader::attach_file | ( | const std::string & | filename, |
GLenum | type ) |
Compiles and attaches shader files.
filename | Path to a shader source file |
type | Shader type |
Definition at line 40 of file shader.cpp.
bool Shader::attach_string | ( | const std::string & | shader_string, |
GLenum | type ) |
Compiles and attaches shader strings.
shader_string | A string containing the shader |
type | Shader type |
Definition at line 103 of file shader.cpp.
void Shader::bind | ( | ) |
Binds the shader and stores the previously bound shader.
Definition at line 180 of file shader.cpp.
int Shader::get_attribute_location | ( | const std::string & | name | ) |
Returns the location of an attribute variable.
name | The name of the attribute variable |
Definition at line 195 of file shader.cpp.
int Shader::get_uniform_location | ( | const std::string & | name | ) |
Returns the location of a uniform variable.
name | The name of the uniform variable |
Definition at line 199 of file shader.cpp.
bool Shader::link | ( | ) |
Links the attached shaders.
Definition at line 160 of file shader.cpp.
void Shader::recompile | ( | ) |
Reads, compiles and links all associated shaders again.
Definition at line 145 of file shader.cpp.
void Shader::set_transform_feedback_variables | ( | std::vector< std::string > & | variables, |
GLenum | buffer_mode ) |
Sets the variable to record in transform feedback buffers.
variables | A list of variable names |
buffer_mode | The mode used to capture the variables when transform feedback is active. Must be must be GL_INTERLEAVED_ATTRIBS or GL_SEPARATE_ATTRIBS. |
Definition at line 133 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const glm::dmat2 & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 281 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const glm::dmat3 & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 293 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const glm::dmat4 & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 305 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const glm::mat2 & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 275 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const glm::mat3 & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 287 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const glm::mat4 & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 299 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const std::vector< glm::dmat2 > & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 414 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const std::vector< glm::dmat3 > & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 428 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const std::vector< glm::dmat4 > & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 442 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const std::vector< glm::mat2 > & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 407 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const std::vector< glm::mat3 > & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 421 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
bool | transpose, | ||
const std::vector< glm::mat4 > & | value ) |
Sets the uniform.
name | The uniform name |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 435 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const glm::dvec2 & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 231 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const glm::dvec3 & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 239 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const glm::dvec4 & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 247 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const glm::vec2 & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 227 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const glm::vec3 & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 235 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const glm::vec4 & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 243 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const std::vector< glm::dvec2 > & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 340 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const std::vector< glm::dvec3 > & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 350 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const std::vector< glm::dvec4 > & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 360 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const std::vector< glm::vec2 > & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 335 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const std::vector< glm::vec3 > & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 345 of file shader.cpp.
void Shader::set_uniform | ( | const std::string & | name, |
const std::vector< glm::vec4 > & | value ) |
Sets the uniform.
name | The uniform name |
value | A reference to the values |
Definition at line 355 of file shader.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void sgltk::Shader::set_uniform | ( | const std::string & | name, |
T | v0 ) |
Sets the uniform.
name | The uniform name |
v0 | The value |
void sgltk::Shader::set_uniform | ( | const std::string & | name, |
T | v0, | ||
T | v1 ) |
Sets the uniform.
name | The uniform name |
v0 | The value of the first element |
v1 | The value of the second element |
void sgltk::Shader::set_uniform | ( | const std::string & | name, |
T | v0, | ||
T | v1, | ||
T | v2 ) |
Sets the uniform.
name | The uniform name |
v0 | The value of the first element |
v1 | The value of the second element |
v2 | The value of the third element |
void sgltk::Shader::set_uniform | ( | const std::string & | name, |
T | v0, | ||
T | v1, | ||
T | v2, | ||
T | v3 ) |
Sets the uniform.
name | The uniform name |
v0 | The value of the first element |
v1 | The value of the second element |
v2 | The value of the third element |
v3 | The value of the fourth element |
|
inline |
|
inline |
void sgltk::Shader::set_uniform | ( | const std::string & | name, |
unsigned int | count, | ||
unsigned int | columns, | ||
unsigned int | rows, | ||
bool | transpose, | ||
const T * | value ) |
Sets the uniform.
name | The uniform name |
count | The number of vectors |
columns | The number of matrix columns |
rows | The number of matrix rows |
transpose | Specifies whether to transpose the matrix |
value | A pointer to the values |
|
inline |
|
inline |
|
inline |
void sgltk::Shader::set_uniform | ( | const std::string & | name, |
unsigned int | count, | ||
unsigned int | elements, | ||
const T * | value ) |
Sets the uniform.
name | The uniform name |
count | The number of vectors |
elements | The number of elements per vector |
value | A pointer to the values |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const glm::dmat2 & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 255 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const glm::dmat3 & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 263 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const glm::dmat4 & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 271 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const glm::mat2 & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 251 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const glm::mat3 & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 259 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const glm::mat4 & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 267 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const std::vector< glm::dmat2 > & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 372 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const std::vector< glm::dmat3 > & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 386 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const std::vector< glm::dmat4 > & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 400 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const std::vector< glm::mat2 > & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 365 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const std::vector< glm::mat3 > & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 379 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
bool | transpose, | ||
const std::vector< glm::mat4 > & | value ) |
Sets the uniform.
location | The uniform location |
transpose | Specifies whether to transpose the matrix |
value | A reference to the values |
Definition at line 393 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const glm::dvec2 & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 207 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const glm::dvec3 & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 215 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const glm::dvec4 & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 223 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const glm::vec2 & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 203 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const glm::vec3 & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 211 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const glm::vec4 & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 219 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const std::vector< glm::dvec2 > & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 315 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const std::vector< glm::dvec3 > & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 323 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const std::vector< glm::dvec4 > & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 331 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const std::vector< glm::vec2 > & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 311 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const std::vector< glm::vec3 > & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 319 of file shader.cpp.
void Shader::set_uniform | ( | int | location, |
const std::vector< glm::vec4 > & | value ) |
Sets the uniform.
location | The uniform location |
value | A reference to the values |
Definition at line 327 of file shader.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void sgltk::Shader::set_uniform | ( | int | location, |
T | v0 ) |
Sets the uniform.
location | The uniform location |
v0 | The value |
void sgltk::Shader::set_uniform | ( | int | location, |
T | v0, | ||
T | v1 ) |
Sets the uniform.
location | The uniform location |
v0 | The value of the first element |
v1 | The value of the second element |
void sgltk::Shader::set_uniform | ( | int | location, |
T | v0, | ||
T | v1, | ||
T | v2 ) |
Sets the uniform.
location | The uniform location |
v0 | The value of the first element |
v1 | The value of the second element |
v2 | The value of the third element |
void sgltk::Shader::set_uniform | ( | int | location, |
T | v0, | ||
T | v1, | ||
T | v2, | ||
T | v3 ) |
Sets the uniform.
location | The uniform location |
v0 | The value of the first element |
v1 | The value of the second element |
v2 | The value of the third element |
v3 | The value of the fourth element |
|
inline |
|
inline |
void sgltk::Shader::set_uniform | ( | int | location, |
unsigned int | count, | ||
unsigned int | columns, | ||
unsigned int | rows, | ||
bool | transpose, | ||
const T * | value ) |
Sets the uniform.
location | The uniform location |
count | The number of vectors |
columns | The number of matrix columns |
rows | The number of matrix rows |
transpose | Specifies whether to transpose the matrix |
value | A pointer to the values |
|
inline |
|
inline |
|
inline |
void sgltk::Shader::set_uniform | ( | int | location, |
unsigned int | count, | ||
unsigned int | elements, | ||
const T * | value ) |
Sets the uniform.
location | The uniform location |
count | The number of vectors |
elements | The number of elements per vector |
value | A pointer to the values |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Shader::unbind | ( | ) |
Unbinds the shader and restores the previously bound shader.
Definition at line 188 of file shader.cpp.
bool sgltk::Shader::transform_feedback |