Class SpvcMslVertexAttribute

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class SpvcMslVertexAttribute
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Defines MSL characteristics of a vertex attribute at a particular location.

    After compilation, it is possible to query whether or not this location was used.

    Layout

    
     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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • LOCATION, MSL_BUFFER, MSL_OFFSET, MSL_STRIDE, PER_INSTANCE, FORMAT, BUILTIN

        The struct member offsets.
    • Constructor Detail

      • SpvcMslVertexAttribute

        public SpvcMslVertexAttribute​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • location

        public int location()
        Returns:
        the value of the location field.
      • msl_buffer, msl_offset, msl_stride, per_instance

        public int msl_buffer()
        
        public int msl_offset()
        
        public int msl_stride()
        
        public boolean per_instance()
        
        Obsolete, do not use. Only lingers on for ABI compatibility.
      • 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.
      • 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.
      • 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

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

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

        public static SpvcMslVertexAttribute.Buffer calloc​(int capacity,
                                                           org.lwjgl.system.MemoryStack stack)
        Returns a new SpvcMslVertexAttribute.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.