|
ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
|
Parameters for creating a Framebuffer. More...
#include <Framebuffer.h>
Data Fields | |
| SDL_Size | size |
| Initial framebuffer dimensions. | |
| SDL_GPUTextureFormat | colorFormats [GPU_MAX_COLOR_TARGETS] |
| The color attachment formats, one per render target (MRT). | |
| Uint32 | numColorTargets |
The number of color attachments; 0 to omit color entirely. | |
| SDL_GPUTextureFormat | depthFormat |
Depth attachment format, or SDL_GPU_TEXTUREFORMAT_INVALID to omit. | |
| SDL_GPUSampleCount | sampleCount |
MSAA sample count; SDL_GPU_SAMPLECOUNT_1 for no multisampling. | |
Parameters for creating a Framebuffer.
The GPU-layer analogue of SDL's *CreateInfo structs, for a target that aggregates several SDL_GPUTexture attachments and so has no single SDL struct. Use a designated initializer; omitted fields default to zero (SDL_GPU_TEXTUREFORMAT_INVALID, SDL_GPU_SAMPLECOUNT_1).
| SDL_GPUTextureFormat GPU_FramebufferCreateInfo::colorFormats[GPU_MAX_COLOR_TARGETS] |
The color attachment formats, one per render target (MRT).
Indices [0, numColorTargets) are used. With MSAA, every color attachment is multisampled and gets its own single-sample resolve target.
| SDL_GPUTextureFormat GPU_FramebufferCreateInfo::depthFormat |
Depth attachment format, or SDL_GPU_TEXTUREFORMAT_INVALID to omit.
A render pass supports at most one depth-stencil target, so this is singular.
| Uint32 GPU_FramebufferCreateInfo::numColorTargets |
The number of color attachments; 0 to omit color entirely.
| 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.
| 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.