Package org.lwjgl.sdl

Class SDL_GPUTextureCreateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_GPUTextureCreateInfo extends Struct<SDL_GPUTextureCreateInfo> implements NativeResource

 struct SDL_GPUTextureCreateInfo {
     SDL_GPUTextureType type;
     SDL_GPUTextureFormat format;
     SDL_GPUTextureUsageFlags usage;
     Uint32 width;
     Uint32 height;
     Uint32 layer_count_or_depth;
     Uint32 num_levels;
     SDL_GPUSampleCount sample_count;
     SDL_PropertiesID props;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
    • USAGE

      public static final int USAGE
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • LAYER_COUNT_OR_DEPTH

      public static final int LAYER_COUNT_OR_DEPTH
      The struct member offsets.
    • NUM_LEVELS

      public static final int NUM_LEVELS
      The struct member offsets.
    • SAMPLE_COUNT

      public static final int SAMPLE_COUNT
      The struct member offsets.
    • PROPS

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

    • SDL_GPUTextureCreateInfo

      public SDL_GPUTextureCreateInfo(ByteBuffer container)
      Creates a SDL_GPUTextureCreateInfo 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_GPUTextureCreateInfo>
    • type

      public int type()
      Returns:
      the value of the type field.
    • format

      public int format()
      Returns:
      the value of the format field.
    • usage

      public int usage()
      Returns:
      the value of the usage field.
    • width

      public int width()
      Returns:
      the value of the width field.
    • height

      public int height()
      Returns:
      the value of the height field.
    • layer_count_or_depth

      public int layer_count_or_depth()
      Returns:
      the value of the layer_count_or_depth field.
    • num_levels

      public int num_levels()
      Returns:
      the value of the num_levels field.
    • sample_count

      public int sample_count()
      Returns:
      the value of the sample_count field.
    • props

      public int props()
      Returns:
      the value of the props field.
    • type

      public SDL_GPUTextureCreateInfo type(int value)
      Sets the specified value to the type field.
    • format

      public SDL_GPUTextureCreateInfo format(int value)
      Sets the specified value to the format field.
    • usage

      public SDL_GPUTextureCreateInfo usage(int value)
      Sets the specified value to the usage field.
    • width

      public SDL_GPUTextureCreateInfo width(int value)
      Sets the specified value to the width field.
    • height

      public SDL_GPUTextureCreateInfo height(int value)
      Sets the specified value to the height field.
    • layer_count_or_depth

      public SDL_GPUTextureCreateInfo layer_count_or_depth(int value)
      Sets the specified value to the layer_count_or_depth field.
    • num_levels

      public SDL_GPUTextureCreateInfo num_levels(int value)
      Sets the specified value to the num_levels field.
    • sample_count

      public SDL_GPUTextureCreateInfo sample_count(int value)
      Sets the specified value to the sample_count field.
    • props

      public SDL_GPUTextureCreateInfo props(int value)
      Sets the specified value to the props field.
    • set

      public SDL_GPUTextureCreateInfo set(int type, int format, int usage, int width, int height, int layer_count_or_depth, int num_levels, int sample_count, int props)
      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_GPUTextureCreateInfo malloc()
      Returns a new SDL_GPUTextureCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static SDL_GPUTextureCreateInfo calloc(MemoryStack stack)
      Returns a new SDL_GPUTextureCreateInfo 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_GPUTextureCreateInfo.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SDL_GPUTextureCreateInfo.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SDL_GPUTextureCreateInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_GPUTextureCreateInfo.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
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().
    • nusage

      public static int nusage(long struct)
      Unsafe version of usage().
    • nwidth

      public static int nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static int nheight(long struct)
      Unsafe version of height().
    • nlayer_count_or_depth

      public static int nlayer_count_or_depth(long struct)
      Unsafe version of layer_count_or_depth().
    • nnum_levels

      public static int nnum_levels(long struct)
      Unsafe version of num_levels().
    • nsample_count

      public static int nsample_count(long struct)
      Unsafe version of sample_count().
    • nprops

      public static int nprops(long struct)
      Unsafe version of props().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nformat

      public static void nformat(long struct, int value)
      Unsafe version of format.
    • nusage

      public static void nusage(long struct, int value)
      Unsafe version of usage.
    • nwidth

      public static void nwidth(long struct, int value)
      Unsafe version of width.
    • nheight

      public static void nheight(long struct, int value)
      Unsafe version of height.
    • nlayer_count_or_depth

      public static void nlayer_count_or_depth(long struct, int value)
      Unsafe version of layer_count_or_depth.
    • nnum_levels

      public static void nnum_levels(long struct, int value)
      Unsafe version of num_levels.
    • nsample_count

      public static void nsample_count(long struct, int value)
      Unsafe version of sample_count.
    • nprops

      public static void nprops(long struct, int value)
      Unsafe version of props.