Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
OpenGLFrameBuffer.hpp
1/*
2Copyright (C) 2019,2021,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGAMES_OPENGLFRAMEBUFFER_HPP
17#define AEONGAMES_OPENGLFRAMEBUFFER_HPP
18#include <cstddef>
19#include "OpenGLFunctions.hpp"
20
21namespace AeonGames
22{
23 class OpenGLRenderer;
25 class OpenGLFrameBuffer
26 {
27 public:
28 OpenGLFrameBuffer();
30 OpenGLFrameBuffer ( OpenGLFrameBuffer&& aOpenGLFrameBuffer );
31 OpenGLFrameBuffer ( const OpenGLFrameBuffer& aOpenGLFrameBuffer ) = delete;
32 OpenGLFrameBuffer& operator= ( const OpenGLFrameBuffer& aOpenGLFrameBuffer ) = delete;
33 OpenGLFrameBuffer& operator= ( OpenGLFrameBuffer&& aOpenGLFrameBuffer ) = delete;
34 ~OpenGLFrameBuffer();
36 void Resize ( uint32_t aWidth, uint32_t aHeight );
38 void Bind();
40 void Unbind();
42 void Initialize();
44 void Finalize();
46 GLuint GetFBO() const;
47 private:
48 GLuint mFBO {};
49 GLuint mColorBuffer {};
50 GLuint mRBO {};
51 };
52}
53#endif
void Finalize()
Release framebuffer resources.
void Unbind()
Unbind the framebuffer, restoring the default render target.
GLuint GetFBO() const
Get the OpenGL framebuffer object identifier.
void Resize(uint32_t aWidth, uint32_t aHeight)
Resize the framebuffer attachments.
void Initialize()
Create and initialize framebuffer resources.
void Bind()
Bind the framebuffer as the active render target.
OpenGL rendering backend implementing the Renderer interface.
<- This is here just for the literals
Definition AABB.hpp:31