SleakEngine
0.1.0
C++23 multi-backend game engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Shader.hpp
Go to the documentation of this file.
1
#ifndef _SHADER_H_
2
#define _SHADER_H_
3
4
#include <
Core/OSDef.hpp
>
5
#include <string>
6
7
namespace
Sleak
{
8
namespace
RenderEngine
{
9
10
/// Backend-agnostic compiled shader program.
11
class
ENGINE_API
Shader
{
12
public
:
13
virtual
~Shader
() =
default
;
14
15
/// Compiles a combined shader source file (or backend-specific bundle) at the given path.
16
virtual
bool
compile
(
const
std::string& shaderPath) = 0;
17
/// Compiles separate vertex and fragment source files.
18
virtual
bool
compile
(
const
std::string& vert,
const
std::string& frag) = 0;
19
/// Binds this program as the active shader for subsequent draws.
20
virtual
void
bind
() = 0;
21
};
22
23
}
24
}
25
26
#endif
OSDef.hpp
Sleak::RenderEngine::Shader
Backend-agnostic compiled shader program.
Definition
Shader.hpp:11
Sleak::RenderEngine::Shader::bind
virtual void bind()=0
Binds this program as the active shader for subsequent draws.
Sleak::RenderEngine::Shader::~Shader
virtual ~Shader()=default
Sleak::RenderEngine::Shader::compile
virtual bool compile(const std::string &vert, const std::string &frag)=0
Compiles separate vertex and fragment source files.
Sleak::RenderEngine::Shader::compile
virtual bool compile(const std::string &shaderPath)=0
Compiles a combined shader source file (or backend-specific bundle) at the given path.
Sleak::RenderEngine
Backend-facing rendering layer shared by the four graphics backends.
Definition
Application.hpp:60
Sleak
Root namespace for everything the engine exposes.
Definition
Camera.hpp:10
include
private
Graphics
Common
Shader.hpp
Generated on
for SleakEngine by
1.18.0