ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
Loading...
Searching...
No Matches
GPU_FramebufferCreateInfo Struct Reference

Parameters for creating a Framebuffer. More...

#include <Framebuffer.h>

Data Fields

SDL_Size size
 Initial framebuffer dimensions.
 
GPU_FramebufferAttachment colorAttachments [GPU_MAX_COLOR_TARGETS]
 The color attachments, one per render target (MRT).
 
Uint32 numColorTargets
 The number of color attachments; 0 to omit color entirely.
 
GPU_FramebufferAttachment depthAttachment
 The depth attachment, or format SDL_GPU_TEXTUREFORMAT_INVALID to omit.
 
SDL_GPUSampleCount sampleCount
 MSAA sample count; SDL_GPU_SAMPLECOUNT_1 for no multisampling.
 

Detailed Description

Parameters for creating a Framebuffer.

Field Documentation

◆ colorAttachments

GPU_FramebufferAttachment GPU_FramebufferCreateInfo::colorAttachments[GPU_MAX_COLOR_TARGETS]

The color attachments, one per render target (MRT).

Indices [0, numColorTargets) are used. Only format, clearColor, and doubleBuffered are meaningful here; leave textures/resolveTextures zeroed.

◆ depthAttachment

GPU_FramebufferAttachment GPU_FramebufferCreateInfo::depthAttachment

The depth attachment, or format SDL_GPU_TEXTUREFORMAT_INVALID to omit.

A render pass supports at most one depth-stencil target, so this is singular. Only format and clearDepth are meaningful here.

◆ numColorTargets

Uint32 GPU_FramebufferCreateInfo::numColorTargets

The number of color attachments; 0 to omit color entirely.

◆ sampleCount

SDL_GPUSampleCount GPU_FramebufferCreateInfo::sampleCount

MSAA sample count; SDL_GPU_SAMPLECOUNT_1 for no multisampling.

When greater, a single-sample resolve target is allocated alongside each multisampled color attachment.

◆ size

SDL_Size GPU_FramebufferCreateInfo::size

Initial framebuffer dimensions.

When the framebuffer is driven by RenderDevice::beginFrame, it is resized to the swapchain each frame, so this is only the initial allocation size.


The documentation for this struct was generated from the following file: