Class VkBufferCopy

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


    public class VkBufferCopy
    extends Struct
    Khronos Reference Page
    Vulkan Specification

    Specifies a buffer regions to copy.

    Member documentation

    • srcOffset – the starting offset in bytes from the start of srcBuffer
    • dstOffset – the starting offset in bytes from the start of dstBuffer
    • size – the number of bytes to copy

    Layout

    struct VkBufferCopy {
        VkDeviceSize srcOffset;
        VkDeviceSize dstOffset;
        VkDeviceSize size;
    }
    • Field Detail

      • SIZEOF

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

      • VkBufferCopy

        public VkBufferCopy(java.nio.ByteBuffer container)
        Creates a VkBufferCopy 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()
        Description copied from class: Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class Struct
      • srcOffset

        public long srcOffset()
        Returns the value of the srcOffset field.
      • dstOffset

        public long dstOffset()
        Returns the value of the dstOffset field.
      • size

        public long size()
        Returns the value of the size field.
      • srcOffset

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

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

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

        public VkBufferCopy set(long srcOffset,
                                long dstOffset,
                                long size)
        Initializes this struct with the specified values.
      • set

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

        public static VkBufferCopy create(long address)
        Returns a new VkBufferCopy instance for the specified memory address or null if the address is NULL.
      • create

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

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

        public static VkBufferCopy.Buffer callocStack(int capacity,
                                                      MemoryStack stack)
        Returns a new VkBufferCopy.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