SDL_BeginGPURenderPass - Man Page

Begins a render pass on a command buffer.

Header File

Defined in SDL3/SDL_gpu.h

Synopsis

#include "SDL3/SDL.h"

SDL_GPURenderPass* SDL_BeginGPURenderPass(
    SDL_GPUCommandBuffer *command_buffer,
    const SDL_GPUColorTargetInfo *color_target_infos,
    Uint32 num_color_targets,
    const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info);

Description

A render pass consists of a set of texture subresources (or depth slices in the 3D texture case) which will be rendered to during the render pass, along with corresponding clear values and load/store operations. All operations related to graphics pipelines must take place inside of a render pass. A default viewport and scissor state are automatically set when this is called. You cannot begin another render pass, or begin a compute pass or copy pass until you have ended the render pass.

Function Parameters

command_buffer

a command buffer.

color_target_infos

an array of texture subresources with corresponding clear values and load/store ops.

num_color_targets

the number of color targets in the color_target_infos array.

depth_stencil_target_info

a texture subresource with corresponding clear value and load/store ops, may be NULL.

Return Value

( SDL_GPURenderPass
*) Returns a render pass handle.

Availability

This function is available since SDL 3.2.0.

See Also

·(3), SDL_EndGPURenderPass(3)

Referenced By

SDL_GPUColorTargetInfo.3type(3), SDL_GPUDepthStencilTargetInfo.3type(3), SDL_GPULoadOp.3type(3), SDL_GPURenderPass.3type(3), SDL_GPUStoreOp.3type(3).

SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS