Ember
A C++ 20 'game engine' built with SDL3 with wide platform support.
Public Member Functions | Protected Attributes | List of all members
Shader Class Referenceabstract

Shader Abstract class. More...

#include <shader.h>

Inheritance diagram for Shader:
OpenglShader

Public Member Functions

 Shader ()=default
 
virtual ~Shader ()=default
 
virtual void Bind () const =0
 
virtual void SetValue (const std::string &name, float value)=0
 
virtual void SetValue (const std::string &name, int value)=0
 
virtual void SetValue (const std::string &name, glm::mat4 value)=0
 
virtual void SetValue (const std::string &name, glm::vec2 value)=0
 
virtual void SetValue (const std::string &name, glm::vec3 value)=0
 
virtual void SetValue (const std::string &name, glm::vec4 value)=0
 
virtual void SetValue (const std::string &name, unsigned int value)=0
 
virtual void Destroy ()=0
 
virtual unsigned int GetID () const =0
 
virtual bool IsValid () const =0
 

Protected Attributes

unsigned int id
 
std::unordered_map< std::string, unsigned int > uniforms
 

Detailed Description

Shader Abstract class.

Version

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( )
default

◆ ~Shader()

virtual Shader::~Shader ( )
virtualdefault

Member Function Documentation

◆ Bind()

virtual void Shader::Bind ( ) const
pure virtual

Implemented in OpenglShader.

◆ Destroy()

virtual void Shader::Destroy ( )
pure virtual

Implemented in OpenglShader.

◆ GetID()

virtual unsigned int Shader::GetID ( ) const
pure virtual

Implemented in OpenglShader.

◆ IsValid()

virtual bool Shader::IsValid ( ) const
pure virtual

Implemented in OpenglShader.

◆ SetValue() [1/7]

virtual void Shader::SetValue ( const std::string &  name,
float  value 
)
pure virtual

Implemented in OpenglShader.

◆ SetValue() [2/7]

virtual void Shader::SetValue ( const std::string &  name,
glm::mat4  value 
)
pure virtual

Implemented in OpenglShader.

◆ SetValue() [3/7]

virtual void Shader::SetValue ( const std::string &  name,
glm::vec2  value 
)
pure virtual

Implemented in OpenglShader.

◆ SetValue() [4/7]

virtual void Shader::SetValue ( const std::string &  name,
glm::vec3  value 
)
pure virtual

Implemented in OpenglShader.

◆ SetValue() [5/7]

virtual void Shader::SetValue ( const std::string &  name,
glm::vec4  value 
)
pure virtual

Implemented in OpenglShader.

◆ SetValue() [6/7]

virtual void Shader::SetValue ( const std::string &  name,
int  value 
)
pure virtual

Implemented in OpenglShader.

◆ SetValue() [7/7]

virtual void Shader::SetValue ( const std::string &  name,
unsigned int  value 
)
pure virtual

Implemented in OpenglShader.

Member Data Documentation

◆ id

unsigned int Shader::id
protected

◆ uniforms

std::unordered_map<std::string, unsigned int> Shader::uniforms
protected

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