Hymn to Beauty
C++ 3D Engine
OpenGLRenderPass.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Interface/RenderPass.hpp"
4
5#include <glad/glad.h>
6
7namespace Video {
8
9class Texture;
10
13 public:
15
21 OpenGLRenderPass(Texture* colorAttachment, RenderPass::LoadOperation colorLoadOperation, Texture* depthAttachment, RenderPass::LoadOperation depthLoadOperation);
22
24
28 OpenGLRenderPass(const glm::uvec2& size, uint32_t msaaSamples);
29
31 ~OpenGLRenderPass() final;
32
33 const glm::uvec2& GetSize() const final;
34
36
39 GLuint GetFrameBuffer() const;
40
42
45 GLbitfield GetClearMask() const;
46
47 private:
48 OpenGLRenderPass(const OpenGLRenderPass& other) = delete;
49
50 GLuint frameBuffer;
51 glm::uvec2 size;
52
53 GLbitfield clearMask;
54};
55
56}
OpenGL implementation of RenderPass.
Definition: OpenGLRenderPass.hpp:12
GLuint GetFrameBuffer() const
Get the render pass' frame buffer.
Definition: OpenGLRenderPass.cpp:83
GLbitfield GetClearMask() const
Get the clear mask for use when beginning the render pass.
Definition: OpenGLRenderPass.cpp:87
~OpenGLRenderPass() final
Destructor.
Definition: OpenGLRenderPass.cpp:75
OpenGLRenderPass(Texture *colorAttachment, RenderPass::LoadOperation colorLoadOperation, Texture *depthAttachment, RenderPass::LoadOperation depthLoadOperation)
Create new OpenGL render pass.
Definition: OpenGLRenderPass.cpp:9
const glm::uvec2 & GetSize() const final
Get the size of the frame buffer.
Definition: OpenGLRenderPass.cpp:79
A render pass.
Definition: RenderPass.hpp:11
LoadOperation
What to do with an image being rendered to before rendering to it.
Definition: RenderPass.hpp:14
A texture.
Definition: Texture.hpp:8
Definition: Editor.hpp:18