Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
eng::ShaderProgram Class Reference

#include <ShaderProgram.h>

Public Member Functions

 ShaderProgram ()=delete
 
 ShaderProgram (const ShaderProgram &)=delete
 
ShaderProgramoperator= (const ShaderProgram &)=delete
 
 ShaderProgram (GLuint shaderProgramID)
 
 ~ShaderProgram ()
 
void Bind ()
 
GLint GetUniformLocation (const std::string &name)
 
void SetUniform (const std::string &name, float value)
 
void SetUniform (const std::string &name, float v0, float v1)
 
void SetUniform (const std::string &name, const glm::mat4 &mat)
 
void SetUniform (const std::string &name, const glm::vec3 &value)
 
void SetUniform (const std::string &name, const glm::vec4 &value)
 
void SetTexture (const std::string &name, Texture *texture)
 

Detailed Description

Definition at line 11 of file ShaderProgram.h.

Constructor & Destructor Documentation

◆ ShaderProgram() [1/3]

eng::ShaderProgram::ShaderProgram ( )
delete

◆ ShaderProgram() [2/3]

eng::ShaderProgram::ShaderProgram ( const ShaderProgram )
delete

◆ ShaderProgram() [3/3]

eng::ShaderProgram::ShaderProgram ( GLuint  shaderProgramID)
explicit

Definition at line 7 of file ShaderProgram.cpp.

◆ ~ShaderProgram()

eng::ShaderProgram::~ShaderProgram ( )

Definition at line 11 of file ShaderProgram.cpp.

Member Function Documentation

◆ Bind()

void eng::ShaderProgram::Bind ( )

Definition at line 16 of file ShaderProgram.cpp.

◆ GetUniformLocation()

GLint eng::ShaderProgram::GetUniformLocation ( const std::string &  name)

Definition at line 22 of file ShaderProgram.cpp.

Referenced by SetTexture(), SetUniform(), SetUniform(), SetUniform(), SetUniform(), and SetUniform().

◆ operator=()

ShaderProgram & eng::ShaderProgram::operator= ( const ShaderProgram )
delete

◆ SetTexture()

void eng::ShaderProgram::SetTexture ( const std::string &  name,
Texture texture 
)

Definition at line 64 of file ShaderProgram.cpp.

References eng::Texture::GetID(), and GetUniformLocation().

◆ SetUniform() [1/5]

void eng::ShaderProgram::SetUniform ( const std::string &  name,
const glm::mat4 &  mat 
)

Definition at line 46 of file ShaderProgram.cpp.

References GetUniformLocation().

◆ SetUniform() [2/5]

void eng::ShaderProgram::SetUniform ( const std::string &  name,
const glm::vec3 &  value 
)

Definition at line 52 of file ShaderProgram.cpp.

References GetUniformLocation().

◆ SetUniform() [3/5]

void eng::ShaderProgram::SetUniform ( const std::string &  name,
const glm::vec4 &  value 
)

Definition at line 58 of file ShaderProgram.cpp.

References GetUniformLocation().

◆ SetUniform() [4/5]

void eng::ShaderProgram::SetUniform ( const std::string &  name,
float  v0,
float  v1 
)

Definition at line 40 of file ShaderProgram.cpp.

References GetUniformLocation().

◆ SetUniform() [5/5]

void eng::ShaderProgram::SetUniform ( const std::string &  name,
float  value 
)

Definition at line 34 of file ShaderProgram.cpp.

References GetUniformLocation().


The documentation for this class was generated from the following files: