Public Member Functions | Public Attributes | List of all members
ecvl::Shader Struct Reference

#include <shader.h>

Public Member Functions

 Shader ()
 
void init (const std::string &vertexCode, const std::string &fragmentCode)
 
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

unsigned int ID
 

Detailed Description

Definition at line 24 of file shader.h.

Constructor & Destructor Documentation

◆ Shader()

ecvl::Shader::Shader ( )
inline

Definition at line 29 of file shader.h.

Member Function Documentation

◆ init()

void ecvl::Shader::init ( const std::string &  vertexCode,
const std::string &  fragmentCode 
)
inline

Definition at line 33 of file shader.h.

◆ setBool()

void ecvl::Shader::setBool ( const std::string &  name,
bool  value 
) const
inline

Definition at line 71 of file shader.h.

◆ setFloat()

void ecvl::Shader::setFloat ( const std::string &  name,
float  value 
) const
inline

Definition at line 81 of file shader.h.

◆ setInt()

void ecvl::Shader::setInt ( const std::string &  name,
int  value 
) const
inline

Definition at line 76 of file shader.h.

◆ setMat2()

void ecvl::Shader::setMat2 ( const std::string &  name,
const glm::mat2 &  mat 
) const
inline

Definition at line 113 of file shader.h.

◆ setMat3()

void ecvl::Shader::setMat3 ( const std::string &  name,
const glm::mat3 &  mat 
) const
inline

Definition at line 118 of file shader.h.

◆ setMat4()

void ecvl::Shader::setMat4 ( const std::string &  name,
const glm::mat4 &  mat 
) const
inline

Definition at line 123 of file shader.h.

◆ setVec2() [1/2]

void ecvl::Shader::setVec2 ( const std::string &  name,
const glm::vec2 &  value 
) const
inline

Definition at line 86 of file shader.h.

◆ setVec2() [2/2]

void ecvl::Shader::setVec2 ( const std::string &  name,
float  x,
float  y 
) const
inline

Definition at line 90 of file shader.h.

◆ setVec3() [1/2]

void ecvl::Shader::setVec3 ( const std::string &  name,
const glm::vec3 &  value 
) const
inline

Definition at line 95 of file shader.h.

◆ setVec3() [2/2]

void ecvl::Shader::setVec3 ( const std::string &  name,
float  x,
float  y,
float  z 
) const
inline

Definition at line 99 of file shader.h.

◆ setVec4() [1/2]

void ecvl::Shader::setVec4 ( const std::string &  name,
const glm::vec4 &  value 
) const
inline

Definition at line 104 of file shader.h.

◆ setVec4() [2/2]

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

Definition at line 108 of file shader.h.

◆ use()

void ecvl::Shader::use ( )
inline

Definition at line 65 of file shader.h.

Member Data Documentation

◆ ID

unsigned int ecvl::Shader::ID

Definition at line 26 of file shader.h.


The documentation for this struct was generated from the following file: