|
ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
|
Framebuffer groups a color and/or depth texture as an off-screen render target. More...
Go to the source code of this file.
Data Structures | |
| struct | GPU_FramebufferAttachment |
| Describes, and backs, a single Framebuffer attachment (color or depth). More... | |
| struct | GPU_FramebufferCreateInfo |
| Parameters for creating a Framebuffer. More... | |
| struct | Framebuffer |
| An off-screen render target grouping a color and/or depth texture. More... | |
Macros | |
| #define | GPU_MAX_COLOR_TARGETS 4 |
| The maximum number of color attachments a Framebuffer may have. | |
Typedefs | |
| typedef struct RenderDevice | RenderDevice |
| typedef struct Framebuffer | Framebuffer |
| typedef struct Texture | Texture |
| typedef struct GPU_FramebufferAttachment | GPU_FramebufferAttachment |
| Describes, and backs, a single Framebuffer attachment (color or depth). | |
| typedef struct GPU_FramebufferCreateInfo | GPU_FramebufferCreateInfo |
| Parameters for creating a Framebuffer. | |
Functions | |
| OBJECTIVELYGPU_EXPORT Class * | _Framebuffer (void) |
Framebuffer groups a color and/or depth texture as an off-screen render target.
| #define GPU_MAX_COLOR_TARGETS 4 |
The maximum number of color attachments a Framebuffer may have.
A render pass binds N color targets plus at most one depth-stencil target; this caps N. Four matches the minimum guaranteed across backends.
| typedef struct Framebuffer Framebuffer |
| typedef struct GPU_FramebufferAttachment GPU_FramebufferAttachment |
Describes, and backs, a single Framebuffer attachment (color or depth).
format, the clear value, and doubleBuffered are the input description: set them in GPU_FramebufferCreateInfo with a designated initializer. textures and resolveTextures are live state, populated by Framebuffer::resize and owned by the Framebuffer – leave them zeroed in a GPU_FramebufferCreateInfo.
When doubleBuffered is true, the attachment allocates both texture slots and Framebuffer::swap alternates which slot is the current frame's write target, so the other slot remains valid to sample as last frame's contents – e.g. a depth copy sampled by soft particles – without a same-frame write-then-read hazard. Single-buffered attachments (doubleBuffered false) only ever use slot 0.
| typedef struct GPU_FramebufferCreateInfo GPU_FramebufferCreateInfo |
Parameters for creating a Framebuffer.
| typedef struct RenderDevice RenderDevice |
| OBJECTIVELYGPU_EXPORT Class * _Framebuffer | ( | void | ) |