Hymn to Beauty
C++ 3D Engine
OpenGLShader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Interface/Shader.hpp"
4
5#include <glad/glad.h>
6#include <ShaderProcessor/ShaderSource.hpp>
7
8namespace Video {
9
11class OpenGLShader : public Shader {
12 public:
14
18 OpenGLShader(const ShaderSource& shaderSource, Type type);
19
21 ~OpenGLShader() final;
22
24
28 GLuint GetShaderID() const;
29
31
34 const ShaderSource::ReflectionInfo& GetReflectionInfo() const;
35
36 private:
37 OpenGLShader(const OpenGLShader& other) = delete;
38
39 GLuint shader;
40
41 ShaderSource::ReflectionInfo reflectionInfo;
42};
43
44}
OpenGL implementation of Shader.
Definition: OpenGLShader.hpp:11
~OpenGLShader() final
Destructor.
Definition: OpenGLShader.cpp:51
OpenGLShader(const ShaderSource &shaderSource, Type type)
Create new OpenGL shader.
Definition: OpenGLShader.cpp:9
const ShaderSource::ReflectionInfo & GetReflectionInfo() const
Get reflection info.
Definition: OpenGLShader.cpp:59
GLuint GetShaderID() const
Get shader ID.
Definition: OpenGLShader.cpp:55
Compiles and handles a shader. Shaders should be linked together into a ShaderProgram.
Definition: Shader.hpp:8
Type
The type of shader.
Definition: Shader.hpp:11
Definition: Editor.hpp:18