Class FrameBuffer
Defined in File FrameBuffer.h
Nested Relationships
Nested Types
Class Documentation
-
class FrameBuffer
An OpenGL FrameBuffer resource (FBO) with either RGBA+depth or depth only render buffers.
Refer to docs for glGenFramebuffers() and glGenRenderbuffers().
See also
Buffer, DepthMapFBO
Main API
-
inline void create(unsigned int width, unsigned int height, int nSamples = 1)
Creates a new FB object and the two (RGBA+depth) render buffers.
-
inline void createDepthMap(unsigned int width, unsigned int height)
Creates a new depth-only FBO.
-
inline void destroy()
Release resources
-
inline FrameBufferBinding bind()
Bind this framebuffer object to the current context.
See also
Bind(), CurrentBinding()
- Returns:
The former binding
-
inline void unbind()
Unbind the framebuffer object from the context
-
void blit()
Blit the framebuffer object onto the screen.
-
inline bool initialized() const
-
inline unsigned int width() const
-
inline unsigned int height() const
-
inline int numSamples() const
-
inline unsigned int depthMapTextureId() const
Static methods
-
static void Bind(const FrameBufferBinding &ids)
-
static void Unbind()
Calls glBindFramebuffer(GL_FRAMEBUFFER, 0);.
-
static FrameBufferBinding CurrentBinding()
Public Functions
-
FrameBuffer() = default
-
inline void create(unsigned int width, unsigned int height, int nSamples = 1)