1 #ifndef B_FRAMEBUFFER_H
2 #define B_FRAMEBUFFER_H
35 virtual void bind(
bool preserveCurrentFramebuffer);
67 virtual void unbind(GLint fbo);
74 virtual void resize(GLint width, GLint height,
bool autoResize);
104 virtual void create();
105 virtual void bindBuffer(
bool preserveCurrentFramebuffer);
108 GLint _width, _height, _oldFbo = 0;
109 GLuint _fbo = 0, _rbo_depth = 0;
110 bool _preserveCurrentFramebuffer, _autoResize;
virtual void unbind()
Unbind the framebuffer object.
Definition: Framebuffer.cpp:100
std::shared_ptr< Texture > TexturePtr
Definition: Texture.h:67
virtual void bindTexture(TexturePtr texture, bool preserveCurrentFramebuffer)
Bind the framebuffer object and draw to the specified texture.
Definition: Framebuffer.cpp:37
A custom framebuffer object allows to draw to non-default framebuffer locations and offers the possib...
Definition: Framebuffer.h:12
GLint getWidth()
Get the width of the framebuffer.
Definition: Framebuffer.h:86
virtual ~Framebuffer()
Virtual destructor.
Definition: Framebuffer.h:30
virtual void deleteFramebuffer()
Delete the framebuffer.
Definition: Framebuffer.cpp:137
std::shared_ptr< DepthMap > DepthMapPtr
Definition: DepthMap.h:28
static GLint getCurrentFramebuffer()
Get the framebuffer currently active.
Definition: Framebuffer.cpp:116
std::shared_ptr< Framebuffer > FramebufferPtr
Definition: Framebuffer.h:114
virtual void bindCubeMap(CubeMapPtr cubeMap, GLuint cubeFace, bool preserveCurrentFramebuffer)
Bind the framebuffer object and draw to the specified cube map.
Definition: Framebuffer.cpp:54
virtual void bindDepthMap(DepthMapPtr depthMap, bool preserveCurrentFramebuffer)
Bind the framebuffer object and draw to the specified depth map.
Definition: Framebuffer.cpp:72
GLint getHeight()
Get the height of the framebuffer.
Definition: Framebuffer.h:90
virtual void bind(bool preserveCurrentFramebuffer)
Bind the framebuffer object.
Definition: Framebuffer.cpp:26
GLuint getDebthbufferID()
Get the depthbuffer id.
Definition: Framebuffer.h:82
virtual void resize(GLint width, GLint height, bool autoResize)
Updates the size of the framebuffer.
Definition: Framebuffer.cpp:123
GLuint getFramebufferID()
Get the framebuffer id.
Definition: Framebuffer.h:78
Framebuffer()
Constructor that takes care of the resolution automatically.
Definition: Framebuffer.cpp:7
std::shared_ptr< CubeMap > CubeMapPtr
Definition: CubeMap.h:33