Voltray Engine Docs
Loading...
Searching...
No Matches
Shader Class Reference

Encapsulates an OpenGL shader program, handling compilation, linking, and usage. More...

#include <Shader.h>

Public Member Functions

 Shader (const std::string &vertexPath, const std::string &fragmentPath)
 
 ~Shader ()
 
void Bind () const
 
void Unbind () const
 
void SetUniformMat4 (const std::string &name, const float *matrix) const
 
void SetUniform3f (const std::string &name, float x, float y, float z) const
 
void SetUniform1f (const std::string &name, float value) const
 

Detailed Description

Encapsulates an OpenGL shader program, handling compilation, linking, and usage.

The Shader class provides functionality to load, compile, and link vertex and fragment shaders, as well as to bind and unbind the resulting shader program for rendering.

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( const std::string &  vertexPath,
const std::string &  fragmentPath 
)

◆ ~Shader()

Shader::~Shader ( )

Member Function Documentation

◆ Bind()

void Shader::Bind ( ) const

◆ SetUniform1f()

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

◆ SetUniform3f()

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

◆ SetUniformMat4()

void Shader::SetUniformMat4 ( const std::string &  name,
const float *  matrix 
) const

◆ Unbind()

void Shader::Unbind ( ) const

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