Class SpvcMslShaderInput

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

    public class SpvcMslShaderInput
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Defines MSL characteristics of an input variable at a particular location.

    After compilation, it is possible to query whether or not this location was used. If vecsize is nonzero, it must be greater than or equal to the vecsize declared in the shader, or behavior is undefined.

    Layout

    
     struct spvc_msl_shader_input {
         unsigned location;
         spvc_msl_vertex_format format;
         SpvBuiltIn builtin;
         unsigned vecsize;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • LOCATION, FORMAT, BUILTIN, VECSIZE

        The struct member offsets.
    • Constructor Detail

      • SpvcMslShaderInput

        public SpvcMslShaderInput​(java.nio.ByteBuffer container)
        Creates a SpvcMslShaderInput 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.
      • format

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

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

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

        public SpvcMslShaderInput location​(int value)
        Sets the specified value to the location field.
      • format

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

        public SpvcMslShaderInput builtin​(int value)
        Sets the specified value to the builtin field.
      • vecsize

        public SpvcMslShaderInput vecsize​(int value)
        Sets the specified value to the vecsize field.
      • set

        public SpvcMslShaderInput set​(int location,
                                      int format,
                                      int builtin,
                                      int vecsize)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

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

        public static SpvcMslShaderInput.Buffer calloc​(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new SpvcMslShaderInput.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().
      • nformat

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

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

        public static int nvecsize​(long struct)
        Unsafe version of vecsize().
      • nlocation

        public static void nlocation​(long struct,
                                     int value)
        Unsafe version of location.
      • 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.
      • nvecsize

        public static void nvecsize​(long struct,
                                    int value)
        Unsafe version of vecsize.