|
Clove
A Simple Physics Engine to simulate Hooke's law in a 2D environment
|
Create Shader Program through reading Vertex and Fragment Shader path files. More...
#include <Shaders.h>
Public Member Functions | |
| Shaders (const char *vertexPath, const char *fragmentPath) | |
| const unsigned int | getID () |
| Allow for shaderID access should it be manually requested. | |
| const void | use () |
| brief Use the Shader | |
| void | setBool (const std::string &name, bool value) const |
| Shader's Boolean Uniform Setter. | |
| void | setInt (const std::string &name, int value) const |
| Shader's Int Uniform Setter. | |
| void | setFloat (const std::string &name, float r, float g, float b, float opacity) const |
| Shader's Float Uniform Setter (Usualy Colour). | |
| const void | errorCheck (std::string errorMessage) |
| Check for errors during shader compilation process#. | |
Create Shader Program through reading Vertex and Fragment Shader path files.
| const void Shaders::errorCheck | ( | std::string | errorMessage | ) |
Check for errors during shader compilation process#.
| errorMessage | Message being displayed should an error occur |
Check if there are any rendering issues during early development
| void Shaders::setBool | ( | const std::string & | name, |
| bool | value ) const |
Shader's Boolean Uniform Setter.
| name | Shader name |
| value | Bool value being set |
| void Shaders::setFloat | ( | const std::string & | name, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | opacity ) const |
Shader's Float Uniform Setter (Usualy Colour).
| name | Shader name |
| r | Red value |
| g | Green value |
| b | Blue value |
| opacity | Opacity value |
| void Shaders::setInt | ( | const std::string & | name, |
| int | value ) const |
Shader's Int Uniform Setter.
| name | Shader name |
| value | Int value being set |