#include <shaders.hh>
|
| | Shader (const std::string &filepath) |
| |
| | ~Shader () |
| |
| void | bind () const |
| |
| void | unbind () const |
| |
| ShaderSourceCode | parse_source (const std::string &filepath) |
| |
| unsigned int | create_sharder (const std::string &vertex_shader, const std::string &fragments_shader) |
| |
| void | set_uniform_int1 (const std::string &name, int value) |
| |
| void | set_uniform_float1 (const std::string &name, float v0) |
| |
| void | set_uniform_float3 (const std::string &name, float v0, float v1, float v2) |
| |
| void | set_uniform_float4 (const std::string &name, float v0, float v1, float v2, float v3) |
| |
| void | set_uniform_mat4 (const std::string &name, glm::mat4 &matrix) |
| |
| void | set_uniform_vec3 (const std::string &name, glm::vec3 &vec) |
| |
| void | set_MVP (glm::mat4 &model, glm::mat4 &view, glm::mat4 &projection) |
| |
| void | set_point_light (PointLight &point_light) |
| |
| void | set_directional_light (DirLight &dir_light) |
| |
| int | get_uniform_location (const std::string &name) |
| |
|
| unsigned int | compile_shader (unsigned int type_shader, const std::string &source) |
| |
◆ Shader()
| Shader::Shader |
( |
const std::string & |
filepath | ) |
|
|
explicit |
◆ ~Shader()
◆ bind()
| void Shader::bind |
( |
| ) |
const |
◆ compile_shader()
| unsigned int Shader::compile_shader |
( |
unsigned int |
type_shader, |
|
|
const std::string & |
source |
|
) |
| |
|
private |
◆ create_sharder()
| unsigned int Shader::create_sharder |
( |
const std::string & |
vertex_shader, |
|
|
const std::string & |
fragments_shader |
|
) |
| |
◆ get_uniform_location()
| int Shader::get_uniform_location |
( |
const std::string & |
name | ) |
|
◆ parse_source()
◆ set_directional_light()
| void Shader::set_directional_light |
( |
DirLight & |
dir_light | ) |
|
◆ set_MVP()
| void Shader::set_MVP |
( |
glm::mat4 & |
model, |
|
|
glm::mat4 & |
view, |
|
|
glm::mat4 & |
projection |
|
) |
| |
◆ set_point_light()
| void Shader::set_point_light |
( |
PointLight & |
point_light | ) |
|
◆ set_uniform_float1()
| void Shader::set_uniform_float1 |
( |
const std::string & |
name, |
|
|
float |
v0 |
|
) |
| |
◆ set_uniform_float3()
| void Shader::set_uniform_float3 |
( |
const std::string & |
name, |
|
|
float |
v0, |
|
|
float |
v1, |
|
|
float |
v2 |
|
) |
| |
◆ set_uniform_float4()
| void Shader::set_uniform_float4 |
( |
const std::string & |
name, |
|
|
float |
v0, |
|
|
float |
v1, |
|
|
float |
v2, |
|
|
float |
v3 |
|
) |
| |
◆ set_uniform_int1()
| void Shader::set_uniform_int1 |
( |
const std::string & |
name, |
|
|
int |
value |
|
) |
| |
◆ set_uniform_mat4()
| void Shader::set_uniform_mat4 |
( |
const std::string & |
name, |
|
|
glm::mat4 & |
matrix |
|
) |
| |
◆ set_uniform_vec3()
| void Shader::set_uniform_vec3 |
( |
const std::string & |
name, |
|
|
glm::vec3 & |
vec |
|
) |
| |
◆ unbind()
| void Shader::unbind |
( |
| ) |
const |
◆ shader_id
| unsigned int Shader::shader_id |
|
private |
◆ source_filepath
| std::string Shader::source_filepath |
|
private |
◆ uniform_location_cache
| std::unordered_map<std::string, int> Shader::uniform_location_cache |
|
private |
The documentation for this class was generated from the following files: