Class VkBufferCopy2

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkBufferCopy2>
org.lwjgl.vulkan.VkBufferCopy2
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkBufferCopy2KHR

public class VkBufferCopy2 extends org.lwjgl.system.Struct<VkBufferCopy2> implements org.lwjgl.system.NativeResource
Structure specifying a buffer copy operation.
Valid Usage
  • The size must be greater than 0
Valid Usage (Implicit)
See Also

VkCopyBufferInfo2

Layout


 struct VkBufferCopy2 {
     VkStructureType sType();
     void const * pNext();
     VkDeviceSize srcOffset();
     VkDeviceSize dstOffset();
     VkDeviceSize size();
 }
  • 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.
    • SRCOFFSET

      public static final int SRCOFFSET
      The struct member offsets.
    • DSTOFFSET

      public static final int DSTOFFSET
      The struct member offsets.
    • SIZE

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

    • VkBufferCopy2

      public VkBufferCopy2(ByteBuffer container)
      Creates a VkBufferCopy2 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkBufferCopy2>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • srcOffset

      public long srcOffset()
      the starting offset in bytes from the start of srcBuffer.
    • dstOffset

      public long dstOffset()
      the starting offset in bytes from the start of dstBuffer.
    • size

      public long size()
      the number of bytes to copy.
    • sType

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

      public VkBufferCopy2 sType$Default()
      Sets the STRUCTURE_TYPE_BUFFER_COPY_2 value to the sType() field.
    • pNext

      public VkBufferCopy2 pNext(long value)
      Sets the specified value to the pNext() field.
    • srcOffset

      public VkBufferCopy2 srcOffset(long value)
      Sets the specified value to the srcOffset() field.
    • dstOffset

      public VkBufferCopy2 dstOffset(long value)
      Sets the specified value to the dstOffset() field.
    • size

      public VkBufferCopy2 size(long value)
      Sets the specified value to the size() field.
    • set

      public VkBufferCopy2 set(int sType, long pNext, long srcOffset, long dstOffset, long size)
      Initializes this struct with the specified values.
    • set

      public VkBufferCopy2 set(VkBufferCopy2 src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nsrcOffset(long struct)
      Unsafe version of srcOffset().
    • ndstOffset

      public static long ndstOffset(long struct)
      Unsafe version of dstOffset().
    • nsize

      public static long nsize(long struct)
      Unsafe version of size().
    • 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.
    • nsrcOffset

      public static void nsrcOffset(long struct, long value)
      Unsafe version of srcOffset.
    • ndstOffset

      public static void ndstOffset(long struct, long value)
      Unsafe version of dstOffset.
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.