Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
framebuffer.h
Go to the documentation of this file.
1 #pragma once
2 
3 // GLEW
4 #include <GL/glew.h>
5 #include "renderbuffer.h"
6 
7 #include <src/utils/glassert.h>
8 
9 namespace fireworks { namespace graphics {
10 
13  {
14  private:
15  GLuint m_BufferID;
16  GLuint m_RenderTexture;
17  RenderBuffer* m_RBO;
18  public:
23  FrameBuffer(int Width, int Height);
24  ~FrameBuffer();
25 
27  void bind() const;
29  void unbind() const;
30 
32  inline GLuint getRenderTexture() const { return m_RenderTexture; }
33  };
34 } }
void unbind() const
Unbind the frame buffer.
Definition: framebuffer.cpp:39
Class to generate Render Buffers.
Definition: renderbuffer.h:11
Definition: audioclip.cpp:3
Class to generate Frame Buffers.
Definition: framebuffer.h:12
~FrameBuffer()
Definition: framebuffer.cpp:28
FrameBuffer(int Width, int Height)
Generates frame buffers to render the current scene to the generated frame buffer.
Definition: framebuffer.cpp:4
GLuint getRenderTexture() const
Gets the Render Texture that the current frame was mapped to.
Definition: framebuffer.h:32
void bind() const
Bind the frame buffer.
Definition: framebuffer.cpp:33