SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::RenderEngine::Shader Class Referenceabstract

Backend-agnostic compiled shader program. More...

#include <Shader.hpp>

Inheritance diagram for Sleak::RenderEngine::Shader:

Public Member Functions

virtual ~Shader ()=default
virtual void bind ()=0
 Binds this program as the active shader for subsequent draws.
virtual bool compile (const std::string &shaderPath)=0
 Compiles a combined shader source file (or backend-specific bundle) at the given path.
virtual bool compile (const std::string &vert, const std::string &frag)=0
 Compiles separate vertex and fragment source files.

Detailed Description

Backend-agnostic compiled shader program.

Definition at line 11 of file Shader.hpp.

Constructor & Destructor Documentation

◆ ~Shader()

virtual Sleak::RenderEngine::Shader::~Shader ( )
virtualdefault

Member Function Documentation

◆ bind()

virtual void Sleak::RenderEngine::Shader::bind ( )
pure virtual

◆ compile() [1/2]

virtual bool Sleak::RenderEngine::Shader::compile ( const std::string & shaderPath)
pure virtual

Compiles a combined shader source file (or backend-specific bundle) at the given path.

Implemented in Sleak::RenderEngine::DirectX11Shader, Sleak::RenderEngine::DirectX12Shader, Sleak::RenderEngine::OpenGLShader, and Sleak::RenderEngine::VulkanShader.

◆ compile() [2/2]

virtual bool Sleak::RenderEngine::Shader::compile ( const std::string & vert,
const std::string & frag )
pure virtual