SDL Wiki
[ front page | index | search | recent changes | git repo | offline html ]

SDL_GPUDepthStencilTargetInfo

A structure specifying the parameters of a depth-stencil target used by a render pass.

Header File

Defined in <SDL3/SDL_gpu.h>

Syntax

typedef struct SDL_GPUDepthStencilTargetInfo
{
    SDL_GPUTexture *texture;               /**< The texture that will be used as the depth stencil target by the render pass. */
    float clear_depth;                     /**< The value to clear the depth component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used. */
    SDL_GPULoadOp load_op;                 /**< What is done with the depth contents at the beginning of the render pass. */
    SDL_GPUStoreOp store_op;               /**< What is done with the depth results of the render pass. */
    SDL_GPULoadOp stencil_load_op;         /**< What is done with the stencil contents at the beginning of the render pass. */
    SDL_GPUStoreOp stencil_store_op;       /**< What is done with the stencil results of the render pass. */
    bool cycle;                            /**< true cycles the texture if the texture is bound and any load ops are not LOAD */
    Uint8 clear_stencil;                   /**< The value to clear the stencil component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used. */
    Uint8 mip_level;                       /**< The mip level to use as the depth stencil target. */
    Uint8 layer;                           /**< The layer index to use as the depth stencil target. */
} SDL_GPUDepthStencilTargetInfo;

Remarks

The load_op field determines what is done with the depth contents of the texture at the beginning of the render pass.

The store_op field determines what is done with the depth results of the render pass.

The stencil_load_op field determines what is done with the stencil contents of the texture at the beginning of the render pass.

The stencil_store_op field determines what is done with the stencil results of the render pass.

Note that depth/stencil targets do not support multisample resolves.

Due to ABI limitations, depth textures with more than 255 layers are not supported.

Version

This struct is available since SDL 3.2.0.

See Also


CategoryAPI, CategoryAPIStruct, CategoryGPU


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.