BlankMat 0.1.0
Free open-source 3D texture creation application
Loading...
Searching...
No Matches
Shader Class Reference

Public Member Functions

 Shader (const std::string &path, bool loadGeom=false, const std::string &shaderName="")
 
 Shader (const char *vertexPath, const char *fragmentPath, const char *geometryPath=nullptr)
 
 ~Shader ()
 
void Use ()
 
void SetBool (const std::string &name, bool value) const
 
void SetInt (const std::string &name, int value) const
 
void SetFloat (const std::string &name, float value) const
 
void SetVec2 (const std::string &name, const glm::vec2 &value) const
 
void SetVec2 (const std::string &name, float x, float y) const
 
void SetVec3 (const std::string &name, const glm::vec3 &value) const
 
void SetVec3 (const std::string &name, float x, float y, float z) const
 
void SetVec4 (const std::string &name, const glm::vec4 &value) const
 
void SetVec4 (const std::string &name, float x, float y, float z, float w)
 
void SetMat2 (const std::string &name, const glm::mat2 &mat) const
 
void SetMat3 (const std::string &name, const glm::mat3 &mat) const
 
void SetMat4 (const std::string &name, const glm::mat4 &mat) const
 

Public Attributes

std::string name
 
unsigned int ID
 

Constructor & Destructor Documentation

◆ Shader() [1/2]

Shader::Shader ( const std::string &  path,
bool  loadGeom = false,
const std::string &  shaderName = "" 
)

◆ Shader() [2/2]

Shader::Shader ( const char *  vertexPath,
const char *  fragmentPath,
const char *  geometryPath = nullptr 
)

◆ ~Shader()

Shader::~Shader ( )

Member Function Documentation

◆ SetBool()

void Shader::SetBool ( const std::string &  name,
bool  value 
) const

◆ SetFloat()

void Shader::SetFloat ( const std::string &  name,
float  value 
) const

◆ SetInt()

void Shader::SetInt ( const std::string &  name,
int  value 
) const

◆ SetMat2()

void Shader::SetMat2 ( const std::string &  name,
const glm::mat2 &  mat 
) const

◆ SetMat3()

void Shader::SetMat3 ( const std::string &  name,
const glm::mat3 &  mat 
) const

◆ SetMat4()

void Shader::SetMat4 ( const std::string &  name,
const glm::mat4 &  mat 
) const

◆ SetVec2() [1/2]

void Shader::SetVec2 ( const std::string &  name,
const glm::vec2 &  value 
) const

◆ SetVec2() [2/2]

void Shader::SetVec2 ( const std::string &  name,
float  x,
float  y 
) const

◆ SetVec3() [1/2]

void Shader::SetVec3 ( const std::string &  name,
const glm::vec3 &  value 
) const

◆ SetVec3() [2/2]

void Shader::SetVec3 ( const std::string &  name,
float  x,
float  y,
float  z 
) const

◆ SetVec4() [1/2]

void Shader::SetVec4 ( const std::string &  name,
const glm::vec4 &  value 
) const

◆ SetVec4() [2/2]

void Shader::SetVec4 ( const std::string &  name,
float  x,
float  y,
float  z,
float  w 
)

◆ Use()

void Shader::Use ( )

Member Data Documentation

◆ ID

unsigned int Shader::ID

◆ name

std::string Shader::name