CGVIS Utils
Loading...
Searching...
No Matches
GLFramebuffer.h File Reference

Convenience RAII wrapper for an OpenGL framebuffer object (FBO). More...

#include <vector>
#include "GLEnv.h"
#include "GLTexture2D.h"
#include "GLTexture3D.h"
#include "GLDepthBuffer.h"
#include "GLDepthTexture.h"
Include dependency graph for GLFramebuffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GLFramebuffer

Detailed Description

Convenience RAII wrapper for an OpenGL framebuffer object (FBO).

Provides helpers to bind combinations of 2D textures, 3D texture slices, and either a depth texture or a depth renderbuffer as attachments. The correct draw buffers are set automatically based on the number of color attachments, and the viewport is updated to match the attached color target's dimensions.

All GL calls in the implementation are wrapped by the GL() macro from GLEnv.h. Overloads cover 0–4 color attachments for both 2D textures and 3D texture slices. Use checkBinding() to verify completeness after binding, and /@ref unbind3D() to detach attachments.