Class VkDrawIndirectCommand

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkDrawIndirectCommand extends Struct<VkDrawIndirectCommand> implements NativeResource

 struct VkDrawIndirectCommand {
     uint32_t vertexCount;
     uint32_t instanceCount;
     uint32_t firstVertex;
     uint32_t firstInstance;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VERTEXCOUNT
      The struct member offsets.
    • INSTANCECOUNT

      public static final int INSTANCECOUNT
      The struct member offsets.
    • FIRSTVERTEX

      public static final int FIRSTVERTEX
      The struct member offsets.
    • FIRSTINSTANCE

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

    • VkDrawIndirectCommand

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

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

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

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

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

      public VkDrawIndirectCommand vertexCount(int value)
      Sets the specified value to the vertexCount field.
    • instanceCount

      public VkDrawIndirectCommand instanceCount(int value)
      Sets the specified value to the instanceCount field.
    • firstVertex

      public VkDrawIndirectCommand firstVertex(int value)
      Sets the specified value to the firstVertex field.
    • firstInstance

      public VkDrawIndirectCommand firstInstance(int value)
      Sets the specified value to the firstInstance field.
    • set

      public VkDrawIndirectCommand set(int vertexCount, int instanceCount, int firstVertex, int firstInstance)
      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 VkDrawIndirectCommand malloc()
      Returns a new VkDrawIndirectCommand instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nvertexCount(long struct)
      Unsafe version of vertexCount().
    • ninstanceCount

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

      public static int nfirstVertex(long struct)
      Unsafe version of firstVertex().
    • nfirstInstance

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

      public static void nvertexCount(long struct, int value)
      Unsafe version of vertexCount.
    • ninstanceCount

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

      public static void nfirstVertex(long struct, int value)
      Unsafe version of firstVertex.
    • nfirstInstance

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