Class VkDrawIndexedIndirectCommand

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

    public class VkDrawIndexedIndirectCommand
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying a draw indexed indirect command.
    Description

    The members of VkDrawIndexedIndirectCommand have the same meaning as the similarly named parameters of CmdDrawIndexed.

    Valid Usage
    • For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
    • (indexSize * (firstIndex + indexCount) offset) must be less than or equal to the size of the bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer
    • If the drawIndirectFirstInstance feature is not enabled, firstInstance must be 0
    See Also

    CmdDrawIndexedIndirect

    Member documentation

    • indexCount – the number of vertices to draw.
    • instanceCount – the number of instances to draw.
    • firstIndex – the base index within the index buffer.
    • vertexOffset – the value added to the vertex index before indexing into the vertex buffer.
    • firstInstance – the instance ID of the first instance to draw.

    Layout

    
     struct VkDrawIndexedIndirectCommand {
         uint32_t indexCount;
         uint32_t instanceCount;
         uint32_t firstIndex;
         int32_t vertexOffset;
         uint32_t firstInstance;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • INDEXCOUNT, INSTANCECOUNT, FIRSTINDEX, VERTEXOFFSET, FIRSTINSTANCE

        The struct member offsets.
    • Constructor Detail

      • VkDrawIndexedIndirectCommand

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

        public int indexCount()
        Returns the value of the indexCount field.
      • instanceCount

        public int instanceCount()
        Returns the value of the instanceCount field.
      • firstIndex

        public int firstIndex()
        Returns the value of the firstIndex field.
      • vertexOffset

        public int vertexOffset()
        Returns the value of the vertexOffset field.
      • firstInstance

        public int firstInstance()
        Returns the value of the firstInstance field.
      • set

        public VkDrawIndexedIndirectCommand set​(int indexCount,
                                                int instanceCount,
                                                int firstIndex,
                                                int vertexOffset,
                                                int firstInstance)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

        public static VkDrawIndexedIndirectCommand mallocStack()
        Returns a new VkDrawIndexedIndirectCommand instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkDrawIndexedIndirectCommand callocStack()
        Returns a new VkDrawIndexedIndirectCommand instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

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

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

        public static int nindexCount​(long struct)
        Unsafe version of indexCount().
      • ninstanceCount

        public static int ninstanceCount​(long struct)
        Unsafe version of instanceCount().
      • nfirstIndex

        public static int nfirstIndex​(long struct)
        Unsafe version of firstIndex().
      • nvertexOffset

        public static int nvertexOffset​(long struct)
        Unsafe version of vertexOffset().
      • nfirstInstance

        public static int nfirstInstance​(long struct)
        Unsafe version of firstInstance().
      • nindexCount

        public static void nindexCount​(long struct,
                                       int value)
        Unsafe version of indexCount.
      • ninstanceCount

        public static void ninstanceCount​(long struct,
                                          int value)
        Unsafe version of instanceCount.
      • nfirstIndex

        public static void nfirstIndex​(long struct,
                                       int value)
        Unsafe version of firstIndex.
      • nvertexOffset

        public static void nvertexOffset​(long struct,
                                         int value)
        Unsafe version of vertexOffset.
      • nfirstInstance

        public static void nfirstInstance​(long struct,
                                          int value)
        Unsafe version of firstInstance.