SleakEngine 1.0.0
C++23 multi-backend game engine
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
7namespace Sleak {
8 namespace RenderEngine {
9
10/// Backend-agnostic compiled shader program.
11class ENGINE_API Shader {
12public:
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
Backend-agnostic compiled shader program.
Definition Shader.hpp:11
virtual void bind()=0
Binds this program as the active shader for subsequent draws.
virtual ~Shader()=default
virtual bool compile(const std::string &vert, const std::string &frag)=0
Compiles separate vertex and fragment source files.
virtual bool compile(const std::string &shaderPath)=0
Compiles a combined shader source file (or backend-specific bundle) at the given path.
Backend-facing rendering layer shared by the four graphics backends.
Root namespace for everything the engine exposes.
Definition Camera.hpp:10