![]() |
Botcraft 1.21.4
|
#include <Shader.hpp>
Public Member Functions | |
Shader (const std::string &vertexPath="", const std::string &fragmentPath="") | |
~Shader () | |
const unsigned int | Program () |
void | Use () |
void | SetBool (const std::string &name, const bool value) const |
void | SetInt (const std::string &name, const int value) const |
void | SetFloat (const std::string &name, const float value) const |
void | SetMat4 (const std::string &name, const glm::mat4 &value) const |
void | SetMat3 (const std::string &name, const glm::mat3 &value) const |
void | SetMat4xN (const std::string &name, const std::vector< glm::mat4 > &value) const |
void | SetMat3xN (const std::string &name, const std::vector< glm::mat3 > &value) const |
void | SetVec3 (const std::string &name, const glm::vec3 &value) const |
void | SetVec2 (const std::string &name, const glm::vec2 &value) const |
Private Member Functions | |
void | CheckCompileErrors (const unsigned int shader, const std::string &type) |
Private Attributes | |
unsigned int | program |
Static Private Attributes | |
static const std::string | default_vertex_shader |
static const std::string | default_fragment_shader |
Definition at line 15 of file Shader.hpp.
Botcraft::Renderer::Shader::Shader | ( | const std::string & | vertexPath = "" , |
const std::string & | fragmentPath = "" |
||
) |
Definition at line 10 of file Shader.cpp.
References CheckCompileErrors(), default_fragment_shader, default_vertex_shader, LOG_ERROR, and program.
Botcraft::Renderer::Shader::~Shader | ( | ) |
Definition at line 90 of file Shader.cpp.
References program.
|
private |
const unsigned int Botcraft::Renderer::Shader::Program | ( | ) |
Definition at line 95 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetBool | ( | const std::string & | name, |
const bool | value | ||
) | const |
Definition at line 107 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetFloat | ( | const std::string & | name, |
const float | value | ||
) | const |
Definition at line 119 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetInt | ( | const std::string & | name, |
const int | value | ||
) | const |
Definition at line 113 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetMat3 | ( | const std::string & | name, |
const glm::mat3 & | value | ||
) | const |
Definition at line 131 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetMat3xN | ( | const std::string & | name, |
const std::vector< glm::mat3 > & | value | ||
) | const |
Definition at line 143 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetMat4 | ( | const std::string & | name, |
const glm::mat4 & | value | ||
) | const |
Definition at line 125 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetMat4xN | ( | const std::string & | name, |
const std::vector< glm::mat4 > & | value | ||
) | const |
Definition at line 137 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetVec2 | ( | const std::string & | name, |
const glm::vec2 & | value | ||
) | const |
Definition at line 155 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::SetVec3 | ( | const std::string & | name, |
const glm::vec3 & | value | ||
) | const |
Definition at line 149 of file Shader.cpp.
References program.
void Botcraft::Renderer::Shader::Use | ( | ) |
Definition at line 101 of file Shader.cpp.
References program.
|
staticprivate |
Definition at line 42 of file Shader.hpp.
Referenced by Shader().
|
staticprivate |
Definition at line 41 of file Shader.hpp.
Referenced by Shader().
|
private |
Definition at line 38 of file Shader.hpp.
Referenced by Program(), SetBool(), SetFloat(), SetInt(), SetMat3(), SetMat3xN(), SetMat4(), SetMat4xN(), SetVec2(), SetVec3(), Shader(), Use(), and ~Shader().