class mrpt::opengl::COpenGLFramebuffer
An OpenGL FrameBuffer resource with RGBA+depth/stencil render buffers.
Refer to docs for glGenFramebuffers() and glGenRenderbuffers().
See also:
#include <mrpt/opengl/COpenGLFramebuffer.h> class COpenGLFramebuffer { public: // structs struct RAII_Impl; // construction COpenGLFramebuffer(); // methods void create(unsigned int width, unsigned int height, int nSamples = 1); void destroy(); FrameBufferBinding bind(); void unbind(); void blit(); bool initialized(); unsigned int width() const; unsigned int height() const; int numSamples() const; static void Bind(const FrameBufferBinding& ids); static FrameBufferBinding CurrentBinding(); };
Methods
void create(unsigned int width, unsigned int height, int nSamples = 1)
Creates a new FB object and the two (RGBA+depth/stencil) render buffers.
void destroy()
Release resources.
FrameBufferBinding bind()
Bind this framebuffer object to the current context.
Returns:
The former binding
See also:
void unbind()
Unbind the framebuffer object from the context.
void blit()
Blit the framebuffer object onto the screen.