Class VkBindBufferMemoryInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
    Direct Known Subclasses:
    VkBindBufferMemoryInfoKHR

    public class VkBindBufferMemoryInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying how to bind a buffer to memory.
    Valid Usage
    Valid Usage (Implicit)
    See Also

    BindBufferMemory2, BindBufferMemory2KHR

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • buffer – the buffer to be attached to memory.
    • memory – a VkDeviceMemory object describing the device memory to attach.
    • memoryOffset – the start offset of the region of memory which is to be bound to the buffer. The number of bytes returned in the VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified buffer.

    Layout

    
     struct VkBindBufferMemoryInfo {
         VkStructureType sType;
         void const * pNext;
         VkBuffer buffer;
         VkDeviceMemory memory;
         VkDeviceSize memoryOffset;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, BUFFER, MEMORY, MEMORYOFFSET

        The struct member offsets.
    • Constructor Detail

      • VkBindBufferMemoryInfo

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

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

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

        public long buffer()
        Returns the value of the buffer field.
      • memory

        public long memory()
        Returns the value of the memory field.
      • memoryOffset

        public long memoryOffset()
        Returns the value of the memoryOffset field.
      • memoryOffset

        public VkBindBufferMemoryInfo memoryOffset​(long value)
        Sets the specified value to the memoryOffset field.
      • set

        public VkBindBufferMemoryInfo set​(int sType,
                                          long pNext,
                                          long buffer,
                                          long memory,
                                          long memoryOffset)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static long nbuffer​(long struct)
        Unsafe version of buffer().
      • nmemory

        public static long nmemory​(long struct)
        Unsafe version of memory().
      • nmemoryOffset

        public static long nmemoryOffset​(long struct)
        Unsafe version of memoryOffset().
      • 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.
      • nbuffer

        public static void nbuffer​(long struct,
                                   long value)
        Unsafe version of buffer.
      • nmemory

        public static void nmemory​(long struct,
                                   long value)
        Unsafe version of memory.
      • nmemoryOffset

        public static void nmemoryOffset​(long struct,
                                         long value)
        Unsafe version of memoryOffset.