Class SpvcMslVertexAttribute

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SpvcMslVertexAttribute extends Struct<SpvcMslVertexAttribute> implements NativeResource

 struct spvc_msl_vertex_attribute {
     unsigned int location;
     unsigned int msl_buffer;
     unsigned int msl_offset;
     unsigned int msl_stride;
     spvc_bool per_instance;
     spvc_msl_vertex_format format;
     SpvBuiltIn builtin;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int LOCATION
      The struct member offsets.
    • MSL_BUFFER

      public static final int MSL_BUFFER
      The struct member offsets.
    • MSL_OFFSET

      public static final int MSL_OFFSET
      The struct member offsets.
    • MSL_STRIDE

      public static final int MSL_STRIDE
      The struct member offsets.
    • PER_INSTANCE

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

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

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

    • SpvcMslVertexAttribute

      public SpvcMslVertexAttribute(ByteBuffer container)
      Creates a SpvcMslVertexAttribute 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<SpvcMslVertexAttribute>
    • location

      public int location()
      Returns:
      the value of the location field.
    • msl_buffer

      public int msl_buffer()
      Returns:
      the value of the msl_buffer field.
    • msl_offset

      public int msl_offset()
      Returns:
      the value of the msl_offset field.
    • msl_stride

      public int msl_stride()
      Returns:
      the value of the msl_stride field.
    • per_instance

      public boolean per_instance()
      Returns:
      the value of the per_instance field.
    • format

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

      public int builtin()
      Returns:
      the value of the builtin field.
    • location

      public SpvcMslVertexAttribute location(int value)
      Sets the specified value to the location field.
    • msl_buffer

      public SpvcMslVertexAttribute msl_buffer(int value)
      Sets the specified value to the msl_buffer field.
    • msl_offset

      public SpvcMslVertexAttribute msl_offset(int value)
      Sets the specified value to the msl_offset field.
    • msl_stride

      public SpvcMslVertexAttribute msl_stride(int value)
      Sets the specified value to the msl_stride field.
    • per_instance

      public SpvcMslVertexAttribute per_instance(boolean value)
      Sets the specified value to the per_instance field.
    • format

      public SpvcMslVertexAttribute format(int value)
      Sets the specified value to the format field.
    • builtin

      public SpvcMslVertexAttribute builtin(int value)
      Sets the specified value to the builtin field.
    • set

      public SpvcMslVertexAttribute set(int location, int msl_buffer, int msl_offset, int msl_stride, boolean per_instance, int format, int builtin)
      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 SpvcMslVertexAttribute malloc()
      Returns a new SpvcMslVertexAttribute instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nlocation(long struct)
      Unsafe version of location().
    • nmsl_buffer

      public static int nmsl_buffer(long struct)
      Unsafe version of msl_buffer().
    • nmsl_offset

      public static int nmsl_offset(long struct)
      Unsafe version of msl_offset().
    • nmsl_stride

      public static int nmsl_stride(long struct)
      Unsafe version of msl_stride().
    • nper_instance

      public static boolean nper_instance(long struct)
      Unsafe version of per_instance().
    • nformat

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

      public static int nbuiltin(long struct)
      Unsafe version of builtin().
    • nlocation

      public static void nlocation(long struct, int value)
      Unsafe version of location.
    • nmsl_buffer

      public static void nmsl_buffer(long struct, int value)
      Unsafe version of msl_buffer.
    • nmsl_offset

      public static void nmsl_offset(long struct, int value)
      Unsafe version of msl_offset.
    • nmsl_stride

      public static void nmsl_stride(long struct, int value)
      Unsafe version of msl_stride.
    • nper_instance

      public static void nper_instance(long struct, boolean value)
      Unsafe version of per_instance.
    • nformat

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

      public static void nbuiltin(long struct, int value)
      Unsafe version of builtin.