Record Class SDL_GPUDepthStencilTargetInfo

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_GPUDepthStencilTargetInfo
All Implemented Interfaces:
IPointer, ISDL_GPUDepthStencilTargetInfo

@ValueBasedCandidate @UnsafeConstructor public record SDL_GPUDepthStencilTargetInfo(@NotNull MemorySegment segment) extends Record implements ISDL_GPUDepthStencilTargetInfo

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

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

  • LOAD: Loads the depth values currently in the texture.
  • CLEAR: Clears the texture to a single depth.
  • DONT_CARE: The driver will do whatever it wants with the 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 depth results of the render pass.

  • STORE: Stores the depth results in the texture.
  • DONT_CARE: The driver will do whatever it wants with the depth results. This is often a good option for depth/stencil textures that don't need to be reused again.

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

  • LOAD: Loads the stencil values currently in the texture.
  • CLEAR: Clears the stencil values to a single value.
  • DONT_CARE: The driver will do whatever it wants with the memory. This is a good option if you know that every single pixel will be touched in the render pass.

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

  • STORE: Stores the stencil results in the texture.
  • DONT_CARE: The driver will do whatever it wants with the stencil results. This is often a good option for depth/stencil textures that don't need to be reused again.

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

Since: This struct is available since SDL 3.2.0.

See also:

  • SDL_BeginGPURenderPass

Structure

typedef struct SDL_GPUDepthStencilTargetInfo {
    SDL_GPUTexture* texture;
    float clear_depth;
    SDL_GPULoadOp load_op;
    SDL_GPUStoreOp store_op;
    SDL_GPULoadOp stencil_load_op;
    SDL_GPUStoreOp stencil_store_op;
    bool cycle;
    Uint8 clear_stencil;
    Uint8 padding1;
    Uint8 padding2;
} SDL_GPUDepthStencilTargetInfo;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.