Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain::ShaderBase Class Reference
+ Inheritance diagram for Mountain::ShaderBase:
+ Collaboration diagram for Mountain::ShaderBase:

Public Member Functions

MOUNTAIN_API void SetUniform (const char_t *keyName, int32_t value) const
 Sets an int (signed, 32 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, uint32_t value) const
 Sets an uint (unsigned, 32 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, bool_t value) const
 Sets a bool (signed, 32 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, float_t value) const
 Sets a float (32 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, Vector2i value) const
 Sets a Vector2 (2 floats, 64 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, Vector2 value) const
 Sets a Vector2 (2 floats, 64 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, const Vector3 &value) const
 Sets a Vector3 (3 floats, 96 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, const Vector4 &value) const
 Sets a Vector4 (4 floats, 128 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, const Color &value) const
 Sets a Color (4 floats, 128 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, const Matrix2 &value) const
 Sets a Matrix2 (4 floats, 128 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, const Matrix3 &value) const
 Sets a Matrix3 (9 floats, 288 bits) variable in a shader.
 
MOUNTAIN_API void SetUniform (const char_t *keyName, const Matrix &value) const
 Sets a Matrix (16 floats, 512 bits) variable in a shader.
 
MOUNTAIN_API uint32_t GetId () const
 Gets the internal id of the shader.
 

Public Attributes

std::unordered_set< std::filesystem::path > dependentShaderFiles
 List of files that are included in this shader file.
 

Protected Member Functions

bool_t CheckCompileError (uint32_t id, std::string_view type, const std::string &code) const
 
bool_t CheckLinkError () const
 
int32_t GetUniformLocation (const char_t *keyName) const
 

Static Protected Member Functions

static void ReplaceIncludes (std::string &code, const std::filesystem::path &path, std::unordered_set< std::filesystem::path > &replacedFiles)
 

Protected Attributes

uint32_t m_Id = 0
 

Detailed Description

Definition at line 11 of file shader_base.hpp.


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