|
Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
|
A shader program. More...
#include <shader.h>
Public Member Functions | |
| ShaderProgram () | |
| ShaderProgram (const Shader &vert, const Shader &frag) | |
| ShaderProgram (const Shader &vert, const Shader &frag, const Shader &geom) | |
| ~ShaderProgram () | |
| void | setBool (const std::string &name, bool value) |
| void | setInt (const std::string &name, int value) |
| void | setFloat (const std::string &name, float value) |
| void | setVec2 (const std::string &name, const glm::vec2 &value) |
| void | setVec2 (const std::string &name, float x, float y) |
| void | setVec3 (const std::string &name, const glm::vec3 &value) |
| void | setVec3 (const std::string &name, float x, float y, float z) |
| void | setVec4 (const std::string &name, const glm::vec4 &value) |
| void | setVec4 (const std::string &name, float x, float y, float z, float w) |
| void | setMat2 (const std::string &name, const glm::mat2 &mat) |
| void | setMat3 (const std::string &name, const glm::mat3 &mat) |
| void | setMat4 (const std::string &name, const glm::mat4 &mat) |
| void | bindTexture (int texture, unsigned int texture_id) |
| void | Set (const std::string &name, bool value) |
| void | Set (const std::string &name, int value) |
| void | Set (const std::string &name, float value) |
| void | Set (const std::string &name, const glm::vec2 &value) |
| void | Set (const std::string &name, float x, float y) |
| void | Set (const std::string &name, const glm::vec3 &value) |
| void | Set (const std::string &name, float x, float y, float z) |
| void | Set (const std::string &name, const glm::vec4 &value) |
| void | Set (const std::string &name, float x, float y, float z, float w) |
| void | Set (const std::string &name, const glm::mat2 &mat) |
| void | Set (const std::string &name, const glm::mat3 &mat) |
| void | Set (const std::string &name, const glm::mat4 &mat) |
| void | UseProgram () |
| void | SetMVP (const glm::mat4 &model, const glm::mat4 &view, const glm::mat4 &projection) |
| operator unsigned int () const | |
Public Attributes | |
| unsigned int | program |
A shader program.
Do note that using this as a direct object is not the preferred usage of the class, and ShaderProgram_t is the preferred way of using it.
Using ShaderDefinition to load and initialize a shader is also the preferred way of using this class.
| cqsp::asset::ShaderProgram::ShaderProgram | ( | ) |
| cqsp::asset::ShaderProgram::ShaderProgram | ( | const Shader & | vert, |
| const Shader & | frag, | ||
| const Shader & | geom | ||
| ) |
| cqsp::asset::ShaderProgram::~ShaderProgram | ( | ) |
| void cqsp::asset::ShaderProgram::bindTexture | ( | int | texture, |
| unsigned int | texture_id | ||
| ) |
|
inline |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| bool | value | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| const glm::mat2 & | mat | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| const glm::mat3 & | mat | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| const glm::mat4 & | mat | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| const glm::vec2 & | value | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| const glm::vec3 & | value | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| const glm::vec4 & | value | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| float | value | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| float | x, | ||
| float | y | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
| void cqsp::asset::ShaderProgram::Set | ( | const std::string & | name, |
| int | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setBool | ( | const std::string & | name, |
| bool | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setFloat | ( | const std::string & | name, |
| float | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setInt | ( | const std::string & | name, |
| int | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setMat2 | ( | const std::string & | name, |
| const glm::mat2 & | mat | ||
| ) |
| void cqsp::asset::ShaderProgram::setMat3 | ( | const std::string & | name, |
| const glm::mat3 & | mat | ||
| ) |
| void cqsp::asset::ShaderProgram::setMat4 | ( | const std::string & | name, |
| const glm::mat4 & | mat | ||
| ) |
| void cqsp::asset::ShaderProgram::SetMVP | ( | const glm::mat4 & | model, |
| const glm::mat4 & | view, | ||
| const glm::mat4 & | projection | ||
| ) |
| void cqsp::asset::ShaderProgram::setVec2 | ( | const std::string & | name, |
| const glm::vec2 & | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setVec2 | ( | const std::string & | name, |
| float | x, | ||
| float | y | ||
| ) |
| void cqsp::asset::ShaderProgram::setVec3 | ( | const std::string & | name, |
| const glm::vec3 & | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setVec3 | ( | const std::string & | name, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
| void cqsp::asset::ShaderProgram::setVec4 | ( | const std::string & | name, |
| const glm::vec4 & | value | ||
| ) |
| void cqsp::asset::ShaderProgram::setVec4 | ( | const std::string & | name, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
| void cqsp::asset::ShaderProgram::UseProgram | ( | ) |
| unsigned int cqsp::asset::ShaderProgram::program |