Package org.lwjgl.sdl

Class SDL_GPUShaderCreateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_GPUShaderCreateInfo extends Struct<SDL_GPUShaderCreateInfo> implements NativeResource

 struct SDL_GPUShaderCreateInfo {
     size_t code_size;
     Uint8 const * code;
     char const * entrypoint;
     SDL_GPUShaderFormat format;
     SDL_GPUShaderStage stage;
     Uint32 num_samplers;
     Uint32 num_storage_textures;
     Uint32 num_storage_buffers;
     Uint32 num_uniform_buffers;
     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.
    • CODE_SIZE

      public static final int CODE_SIZE
      The struct member offsets.
    • CODE

      public static final int CODE
      The struct member offsets.
    • ENTRYPOINT

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

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

      public static final int STAGE
      The struct member offsets.
    • NUM_SAMPLERS

      public static final int NUM_SAMPLERS
      The struct member offsets.
    • NUM_STORAGE_TEXTURES

      public static final int NUM_STORAGE_TEXTURES
      The struct member offsets.
    • NUM_STORAGE_BUFFERS

      public static final int NUM_STORAGE_BUFFERS
      The struct member offsets.
    • NUM_UNIFORM_BUFFERS

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

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

    • SDL_GPUShaderCreateInfo

      public SDL_GPUShaderCreateInfo(ByteBuffer container)
      Creates a SDL_GPUShaderCreateInfo 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_GPUShaderCreateInfo>
    • code_size

      public long code_size()
      Returns:
      the value of the code_size field.
    • code

      public ByteBuffer code()
      Returns:
      a ByteBuffer view of the data pointed to by the code field.
    • entrypoint

      public ByteBuffer entrypoint()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the entrypoint field.
    • entrypointString

      public String entrypointString()
      Returns:
      the null-terminated string pointed to by the entrypoint field.
    • format

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

      public int stage()
      Returns:
      the value of the stage field.
    • num_samplers

      public int num_samplers()
      Returns:
      the value of the num_samplers field.
    • num_storage_textures

      public int num_storage_textures()
      Returns:
      the value of the num_storage_textures field.
    • num_storage_buffers

      public int num_storage_buffers()
      Returns:
      the value of the num_storage_buffers field.
    • num_uniform_buffers

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

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

      public SDL_GPUShaderCreateInfo code(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the code field.
    • entrypoint

      public SDL_GPUShaderCreateInfo entrypoint(ByteBuffer value)
      Sets the address of the specified encoded string to the entrypoint field.
    • format

      public SDL_GPUShaderCreateInfo format(int value)
      Sets the specified value to the format field.
    • stage

      public SDL_GPUShaderCreateInfo stage(int value)
      Sets the specified value to the stage field.
    • num_samplers

      public SDL_GPUShaderCreateInfo num_samplers(int value)
      Sets the specified value to the num_samplers field.
    • num_storage_textures

      public SDL_GPUShaderCreateInfo num_storage_textures(int value)
      Sets the specified value to the num_storage_textures field.
    • num_storage_buffers

      public SDL_GPUShaderCreateInfo num_storage_buffers(int value)
      Sets the specified value to the num_storage_buffers field.
    • num_uniform_buffers

      public SDL_GPUShaderCreateInfo num_uniform_buffers(int value)
      Sets the specified value to the num_uniform_buffers field.
    • props

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

      public SDL_GPUShaderCreateInfo set(ByteBuffer code, ByteBuffer entrypoint, int format, int stage, int num_samplers, int num_storage_textures, int num_storage_buffers, int num_uniform_buffers, 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_GPUShaderCreateInfo malloc()
      Returns a new SDL_GPUShaderCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static long ncode_size(long struct)
      Unsafe version of code_size().
    • ncode

      public static ByteBuffer ncode(long struct)
      Unsafe version of code.
    • nentrypoint

      public static ByteBuffer nentrypoint(long struct)
      Unsafe version of entrypoint().
    • nentrypointString

      public static String nentrypointString(long struct)
      Unsafe version of entrypointString().
    • nformat

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

      public static int nstage(long struct)
      Unsafe version of stage().
    • nnum_samplers

      public static int nnum_samplers(long struct)
      Unsafe version of num_samplers().
    • nnum_storage_textures

      public static int nnum_storage_textures(long struct)
      Unsafe version of num_storage_textures().
    • nnum_storage_buffers

      public static int nnum_storage_buffers(long struct)
      Unsafe version of num_storage_buffers().
    • nnum_uniform_buffers

      public static int nnum_uniform_buffers(long struct)
      Unsafe version of num_uniform_buffers().
    • nprops

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

      public static void ncode_size(long struct, long value)
      Sets the specified value to the code_size field of the specified struct.
    • ncode

      public static void ncode(long struct, ByteBuffer value)
      Unsafe version of code.
    • nentrypoint

      public static void nentrypoint(long struct, ByteBuffer value)
      Unsafe version of entrypoint.
    • nformat

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

      public static void nstage(long struct, int value)
      Unsafe version of stage.
    • nnum_samplers

      public static void nnum_samplers(long struct, int value)
      Unsafe version of num_samplers.
    • nnum_storage_textures

      public static void nnum_storage_textures(long struct, int value)
      Unsafe version of num_storage_textures.
    • nnum_storage_buffers

      public static void nnum_storage_buffers(long struct, int value)
      Unsafe version of num_storage_buffers.
    • nnum_uniform_buffers

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

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

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