Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
shader.h
1#ifndef OE_RENDER_SHADER_H
2#define OE_RENDER_SHADER_H
3
4#include "../common.h"
5
6#include <vector>
7#include <string>
8#include <map>
9#include <unordered_map>
10#include <glm/mat4x4.hpp>
11
12#include "shader_base.h"
13
14namespace oe::render
15{
25 class Shader : public ShaderBase
26 {
27 public:
33 Shader(const std::string& name = "");
34
42 static const std::shared_ptr<Shader> generatePostProcessingShader(const std::string& fragment_code, const bool compile = true);
43
48 void compile();
49
53 void bind();
54
60 void setVertexShader(const std::string& contents);
61
67 void setFragmentShader(const std::string& contents);
68 };
69}
70
71#endif
Shader class.
Definition shader_base.h:33
Standard shader class.
Definition shader.h:26
void setVertexShader(const std::string &contents)
Set source code for the vertex stage.
Shader(const std::string &name="")
Create a new shader instance.
void compile()
Compile / link the shader using the graphic API.
void setFragmentShader(const std::string &contents)
Set source code for the fragment stage.
void bind()
Tell the graphic API to use this shader for the next renderings.
static const std::shared_ptr< Shader > generatePostProcessingShader(const std::string &fragment_code, const bool compile=true)
Generate a shader ready for post-processing effects.
Render related abstractions (Shader, Framebuffer, Cubemaps, Textures)
Definition opengl.h:10