logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GPUColorTargetInfo - A structure specifying the parameters of a color target used by a render pass.

Availability

       This struct is available since SDL 3.2.0.

Description

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

       •  LOAD: Loads the data currently in the texture. Not recommended for multisample textures as it requires
       significant memory bandwidth.

       • CLEAR: Clears the texture to a single color.

       • DONT_CARE: The driver will do whatever it wants with the texture memory. This is a good option  if  you
       know that every single pixel will be touched in the render pass.

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

       •  STORE:  Stores the results of the render pass in the texture. Not recommended for multisample textures
       as it requires significant memory bandwidth.

       • DONT_CARE: The driver will do whatever it wants with the texture memory. This is often  a  good  option
       for depth/stencil textures.

       • RESOLVE: Resolves a multisample texture into resolve_texture, which must have a sample count of 1. Then
       the  driver may discard the multisample texture memory. This is the most performant method of resolving a
       multisample target.

       • RESOLVE_AND_STORE: Resolves a multisample texture into the resolve_texture, which must  have  a  sample
       count  of  1.  Then  the driver stores the multisample texture's contents. Not recommended as it requires
       significant memory bandwidth.

Name

       SDL_GPUColorTargetInfo - A structure specifying the parameters of a color target used by a render pass.

See Also

SDL_BeginGPURenderPass(3)

Simple Directmedia Layer                           SDL 3.2.20                      SDL_GPUColorTargetInfo(3type)

Synopsis

#include<SDL3/SDL_gpu.h>typedefstructSDL_GPUColorTargetInfo{SDL_GPUTexture*texture;/**<Thetexturethatwillbeusedasacolortargetbyarenderpass.*/Uint32mip_level;/**<Themipleveltouseasacolortarget.*/Uint32layer_or_depth_plane;/**<Thelayerindexordepthplanetouseasacolortarget.Thisvalueistreatedasalayerindexon2Darrayandcubetextures,andasadepthplaneon3Dtextures.*/SDL_FColorclear_color;/**<Thecolortoclearthecolortargettoatthestartoftherenderpass.IgnoredifSDL_GPU_LOADOP_CLEARisnotused.*/SDL_GPULoadOpload_op;/**<Whatisdonewiththecontentsofthecolortargetatthebeginningoftherenderpass.*/SDL_GPUStoreOpstore_op;/**<Whatisdonewiththeresultsoftherenderpass.*/SDL_GPUTexture*resolve_texture;/**<Thetexturethatwillreceivetheresultsofamultisampleresolveoperation.IgnoredifaRESOLVE*store_opisnotused.*/Uint32resolve_mip_level;/**<Themipleveloftheresolvetexturetousefortheresolveoperation.IgnoredifaRESOLVE*store_opisnotused.*/Uint32resolve_layer;/**<Thelayerindexoftheresolvetexturetousefortheresolveoperation.IgnoredifaRESOLVE*store_opisnotused.*/boolcycle;/**<truecyclesthetextureifthetextureisboundandload_opisnotLOAD*/boolcycle_resolve_texture;/**<truecyclestheresolvetextureiftheresolvetextureisbound.IgnoredifaRESOLVE*store_opisnotused.*/Uint8padding1;Uint8padding2;}SDL_GPUColorTargetInfo;

See Also