Package org.lwjgl.sdl

Class SDL_GPUColorTargetInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_GPUColorTargetInfo extends Struct<SDL_GPUColorTargetInfo> implements NativeResource

 struct SDL_GPUColorTargetInfo {
     SDL_GPUTexture * texture;
     Uint32 mip_level;
     Uint32 layer_or_depth_plane;
     {@link SDL_FColor SDL_FColor} clear_color;
     SDL_GPULoadOp load_op;
     SDL_GPUStoreOp store_op;
     SDL_GPUTexture * resolve_texture;
     Uint32 resolve_mip_level;
     Uint32 resolve_layer;
     bool cycle;
     bool cycle_resolve_texture;
     Uint8 padding1;
     Uint8 padding2;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TEXTURE

      public static final int TEXTURE
      The struct member offsets.
    • MIP_LEVEL

      public static final int MIP_LEVEL
      The struct member offsets.
    • LAYER_OR_DEPTH_PLANE

      public static final int LAYER_OR_DEPTH_PLANE
      The struct member offsets.
    • CLEAR_COLOR

      public static final int CLEAR_COLOR
      The struct member offsets.
    • LOAD_OP

      public static final int LOAD_OP
      The struct member offsets.
    • STORE_OP

      public static final int STORE_OP
      The struct member offsets.
    • RESOLVE_TEXTURE

      public static final int RESOLVE_TEXTURE
      The struct member offsets.
    • RESOLVE_MIP_LEVEL

      public static final int RESOLVE_MIP_LEVEL
      The struct member offsets.
    • RESOLVE_LAYER

      public static final int RESOLVE_LAYER
      The struct member offsets.
    • CYCLE

      public static final int CYCLE
      The struct member offsets.
    • CYCLE_RESOLVE_TEXTURE

      public static final int CYCLE_RESOLVE_TEXTURE
      The struct member offsets.
    • PADDING1

      public static final int PADDING1
      The struct member offsets.
    • PADDING2

      public static final int PADDING2
      The struct member offsets.
  • Constructor Details

    • SDL_GPUColorTargetInfo

      public SDL_GPUColorTargetInfo(ByteBuffer container)
      Creates a SDL_GPUColorTargetInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<SDL_GPUColorTargetInfo>
    • texture

      public long texture()
      Returns:
      the value of the texture field.
    • mip_level

      public int mip_level()
      Returns:
      the value of the mip_level field.
    • layer_or_depth_plane

      public int layer_or_depth_plane()
      Returns:
      the value of the layer_or_depth_plane field.
    • clear_color

      public SDL_FColor clear_color()
      Returns:
      a SDL_FColor view of the clear_color field.
    • load_op

      public int load_op()
      Returns:
      the value of the load_op field.
    • store_op

      public int store_op()
      Returns:
      the value of the store_op field.
    • resolve_texture

      public long resolve_texture()
      Returns:
      the value of the resolve_texture field.
    • resolve_mip_level

      public int resolve_mip_level()
      Returns:
      the value of the resolve_mip_level field.
    • resolve_layer

      public int resolve_layer()
      Returns:
      the value of the resolve_layer field.
    • cycle

      public boolean cycle()
      Returns:
      the value of the cycle field.
    • cycle_resolve_texture

      public boolean cycle_resolve_texture()
      Returns:
      the value of the cycle_resolve_texture field.
    • texture

      public SDL_GPUColorTargetInfo texture(long value)
      Sets the specified value to the texture field.
    • mip_level

      public SDL_GPUColorTargetInfo mip_level(int value)
      Sets the specified value to the mip_level field.
    • layer_or_depth_plane

      public SDL_GPUColorTargetInfo layer_or_depth_plane(int value)
      Sets the specified value to the layer_or_depth_plane field.
    • clear_color

      public SDL_GPUColorTargetInfo clear_color(SDL_FColor value)
      Copies the specified SDL_FColor to the clear_color field.
    • clear_color

      public SDL_GPUColorTargetInfo clear_color(Consumer<SDL_FColor> consumer)
      Passes the clear_color field to the specified Consumer.
    • load_op

      public SDL_GPUColorTargetInfo load_op(int value)
      Sets the specified value to the load_op field.
    • store_op

      public SDL_GPUColorTargetInfo store_op(int value)
      Sets the specified value to the store_op field.
    • resolve_texture

      public SDL_GPUColorTargetInfo resolve_texture(long value)
      Sets the specified value to the resolve_texture field.
    • resolve_mip_level

      public SDL_GPUColorTargetInfo resolve_mip_level(int value)
      Sets the specified value to the resolve_mip_level field.
    • resolve_layer

      public SDL_GPUColorTargetInfo resolve_layer(int value)
      Sets the specified value to the resolve_layer field.
    • cycle

      public SDL_GPUColorTargetInfo cycle(boolean value)
      Sets the specified value to the cycle field.
    • cycle_resolve_texture

      public SDL_GPUColorTargetInfo cycle_resolve_texture(boolean value)
      Sets the specified value to the cycle_resolve_texture field.
    • set

      public SDL_GPUColorTargetInfo set(long texture, int mip_level, int layer_or_depth_plane, SDL_FColor clear_color, int load_op, int store_op, long resolve_texture, int resolve_mip_level, int resolve_layer, boolean cycle, boolean cycle_resolve_texture)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static SDL_GPUColorTargetInfo malloc()
      Returns a new SDL_GPUColorTargetInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static SDL_GPUColorTargetInfo calloc()
      Returns a new SDL_GPUColorTargetInfo instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static SDL_GPUColorTargetInfo create()
      Returns a new SDL_GPUColorTargetInfo instance allocated with BufferUtils.
    • create

      public static SDL_GPUColorTargetInfo create(long address)
      Returns a new SDL_GPUColorTargetInfo instance for the specified memory address.
    • createSafe

      public static @Nullable SDL_GPUColorTargetInfo createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static SDL_GPUColorTargetInfo.Buffer malloc(int capacity)
      Returns a new SDL_GPUColorTargetInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static SDL_GPUColorTargetInfo.Buffer calloc(int capacity)
      Returns a new SDL_GPUColorTargetInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SDL_GPUColorTargetInfo.Buffer create(int capacity)
      Returns a new SDL_GPUColorTargetInfo.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SDL_GPUColorTargetInfo.Buffer create(long address, int capacity)
      Create a SDL_GPUColorTargetInfo.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable SDL_GPUColorTargetInfo.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static SDL_GPUColorTargetInfo malloc(MemoryStack stack)
      Returns a new SDL_GPUColorTargetInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static SDL_GPUColorTargetInfo calloc(MemoryStack stack)
      Returns a new SDL_GPUColorTargetInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static SDL_GPUColorTargetInfo.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SDL_GPUColorTargetInfo.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SDL_GPUColorTargetInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_GPUColorTargetInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntexture

      public static long ntexture(long struct)
      Unsafe version of texture().
    • nmip_level

      public static int nmip_level(long struct)
      Unsafe version of mip_level().
    • nlayer_or_depth_plane

      public static int nlayer_or_depth_plane(long struct)
      Unsafe version of layer_or_depth_plane().
    • nclear_color

      public static SDL_FColor nclear_color(long struct)
      Unsafe version of clear_color().
    • nload_op

      public static int nload_op(long struct)
      Unsafe version of load_op().
    • nstore_op

      public static int nstore_op(long struct)
      Unsafe version of store_op().
    • nresolve_texture

      public static long nresolve_texture(long struct)
      Unsafe version of resolve_texture().
    • nresolve_mip_level

      public static int nresolve_mip_level(long struct)
      Unsafe version of resolve_mip_level().
    • nresolve_layer

      public static int nresolve_layer(long struct)
      Unsafe version of resolve_layer().
    • ncycle

      public static boolean ncycle(long struct)
      Unsafe version of cycle().
    • ncycle_resolve_texture

      public static boolean ncycle_resolve_texture(long struct)
      Unsafe version of cycle_resolve_texture().
    • npadding1

      public static byte npadding1(long struct)
    • npadding2

      public static byte npadding2(long struct)
    • ntexture

      public static void ntexture(long struct, long value)
      Unsafe version of texture.
    • nmip_level

      public static void nmip_level(long struct, int value)
      Unsafe version of mip_level.
    • nlayer_or_depth_plane

      public static void nlayer_or_depth_plane(long struct, int value)
      Unsafe version of layer_or_depth_plane.
    • nclear_color

      public static void nclear_color(long struct, SDL_FColor value)
      Unsafe version of clear_color.
    • nload_op

      public static void nload_op(long struct, int value)
      Unsafe version of load_op.
    • nstore_op

      public static void nstore_op(long struct, int value)
      Unsafe version of store_op.
    • nresolve_texture

      public static void nresolve_texture(long struct, long value)
      Unsafe version of resolve_texture.
    • nresolve_mip_level

      public static void nresolve_mip_level(long struct, int value)
      Unsafe version of resolve_mip_level.
    • nresolve_layer

      public static void nresolve_layer(long struct, int value)
      Unsafe version of resolve_layer.
    • ncycle

      public static void ncycle(long struct, boolean value)
      Unsafe version of cycle.
    • ncycle_resolve_texture

      public static void ncycle_resolve_texture(long struct, boolean value)
      Unsafe version of cycle_resolve_texture.
    • npadding1

      public static void npadding1(long struct, byte value)
    • npadding2

      public static void npadding2(long struct, byte value)
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate