Skip to content

File FrameBuffer.h

FileList > buffers > FrameBuffer.h

Go to the source code of this file

OpenGL framebuffer abstraction with multi-target support. More...

  • #include "RenderBuffer.h"
  • #include <cstdarg>
  • #include <optional>
  • #include <unordered_map>
  • #include <vector>

Classes

Type Name
struct FBPixel
Framebuffer pixel data structure.
class FrameBuffer
OpenGL framebuffer wrapper with multi-target and dynamic resize support.

Public Types

Type Name
enum FBType
Framebuffer attachment type identifiers.

Macros

Type Name
define AVAIL_PASSES { EMIS\_COL\_FB, POS\_FB, NORMAL\_FB, ALBEDO\_FB, MRSE\_FB, RAND\_FB, ID\_FB, MASK\_FB }
Available G-Buffer passes for deferred rendering.
define RESULT_PASSES { COMBINE\_FB, DIR\_DIFF\_FB, DIR\_SPEC\_FB, IND\_DIFF\_FB, IND\_SPEC\_FB, DIR\_EMIS\_FB }
Result passes for lighting composition.

Detailed Description

FrameBuffer provides RAII wrapper around OpenGL FBO (Framebuffer Object) with support for multiple color attachments, depth buffers, and dynamic resizing. Used extensively in deferred rendering for G-Buffer and post-processing.

Note:

All OpenGL resources are released deterministically in destructor.

Public Types Documentation

enum FBType

Framebuffer attachment type identifiers.

enum FBType {
    NONE_FB = -1,
    COMBINE_FB = 0,
    EMIS_COL_FB,
    LIGHT_AO_FB = 1,
    DIR_DIFF_FB = 1,
    POS_FB,
    POS_B_FB = 2,
    DIR_SPEC_FB = 2,
    MRSE_FB,
    OPT_FLW_FB = 3,
    IND_DIFF_FB = 3,
    NORMAL_FB,
    IND_SPEC_FB = 4,
    DIR_EMIS_FB = 5,
    ALBEDO_FB,
    MASK_FB,
    RAND_FB,
    ID_FB,
    SINGLE_FB,
    SHADOW_FB,
    MAX_FB,
    DEPTH_FB = GL_DEPTH_ATTACHMENT - GL_COLOR_ATTACHMENT0
};

Each FBType corresponds to a specific framebuffer attachment used in the deferred rendering pipeline. Types are organized by format (HDR, RGB, Float).


Macro Definition Documentation

define AVAIL_PASSES

Available G-Buffer passes for deferred rendering.

#define AVAIL_PASSES `{ EMIS_COL_FB , POS_FB , NORMAL_FB , ALBEDO_FB , MRSE_FB , RAND_FB , ID_FB , MASK_FB }`


define RESULT_PASSES

Result passes for lighting composition.

#define RESULT_PASSES `{ COMBINE_FB , DIR_DIFF_FB , DIR_SPEC_FB , IND_DIFF_FB , IND_SPEC_FB , DIR_EMIS_FB }`



The documentation for this class was generated from the following file src/render/buffers/FrameBuffer.h