Class VkCopyBufferInfo2

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
Direct Known Subclasses:
VkCopyBufferInfo2KHR

public class VkCopyBufferInfo2 extends Struct<VkCopyBufferInfo2> implements NativeResource

 struct VkCopyBufferInfo2 {
     VkStructureType sType;
     void const * pNext;
     VkBuffer srcBuffer;
     VkBuffer dstBuffer;
     uint32_t regionCount;
     {@link VkBufferCopy2 VkBufferCopy2} const * pRegions;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • SRCBUFFER

      public static final int SRCBUFFER
      The struct member offsets.
    • DSTBUFFER

      public static final int DSTBUFFER
      The struct member offsets.
    • REGIONCOUNT

      public static final int REGIONCOUNT
      The struct member offsets.
    • PREGIONS

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

    • VkCopyBufferInfo2

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

      public int sType()
      Returns:
      the value of the sType field.
    • pNext

      public long pNext()
      Returns:
      the value of the pNext field.
    • srcBuffer

      public long srcBuffer()
      Returns:
      the value of the srcBuffer field.
    • dstBuffer

      public long dstBuffer()
      Returns:
      the value of the dstBuffer field.
    • regionCount

      public int regionCount()
      Returns:
      the value of the regionCount field.
    • pRegions

      public VkBufferCopy2.Buffer pRegions()
      Returns:
      a VkBufferCopy2.Buffer view of the struct array pointed to by the pRegions field.
    • sType

      public VkCopyBufferInfo2 sType(int value)
      Sets the specified value to the sType field.
    • sType$Default

      public VkCopyBufferInfo2 sType$Default()
      Sets the STRUCTURE_TYPE_COPY_BUFFER_INFO_2 value to the sType field.
    • pNext

      public VkCopyBufferInfo2 pNext(long value)
      Sets the specified value to the pNext field.
    • srcBuffer

      public VkCopyBufferInfo2 srcBuffer(long value)
      Sets the specified value to the srcBuffer field.
    • dstBuffer

      public VkCopyBufferInfo2 dstBuffer(long value)
      Sets the specified value to the dstBuffer field.
    • pRegions

      public VkCopyBufferInfo2 pRegions(VkBufferCopy2.Buffer value)
      Sets the address of the specified VkBufferCopy2.Buffer to the pRegions field.
    • set

      public VkCopyBufferInfo2 set(int sType, long pNext, long srcBuffer, long dstBuffer, VkBufferCopy2.Buffer pRegions)
      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 VkCopyBufferInfo2 malloc()
      Returns a new VkCopyBufferInfo2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nsrcBuffer

      public static long nsrcBuffer(long struct)
      Unsafe version of srcBuffer().
    • ndstBuffer

      public static long ndstBuffer(long struct)
      Unsafe version of dstBuffer().
    • nregionCount

      public static int nregionCount(long struct)
      Unsafe version of regionCount().
    • npRegions

      public static VkBufferCopy2.Buffer npRegions(long struct)
      Unsafe version of pRegions().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nsrcBuffer

      public static void nsrcBuffer(long struct, long value)
      Unsafe version of srcBuffer.
    • ndstBuffer

      public static void ndstBuffer(long struct, long value)
      Unsafe version of dstBuffer.
    • nregionCount

      public static void nregionCount(long struct, int value)
      Sets the specified value to the regionCount field of the specified struct.
    • npRegions

      public static void npRegions(long struct, VkBufferCopy2.Buffer value)
      Unsafe version of pRegions.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate