Class VmaVirtualAllocationInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VmaVirtualAllocationInfo>
org.lwjgl.util.vma.VmaVirtualAllocationInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VmaVirtualAllocationInfo extends org.lwjgl.system.Struct<VmaVirtualAllocationInfo> implements org.lwjgl.system.NativeResource
Parameters of an existing virtual allocation, returned by GetVirtualAllocationInfo.

Layout


 struct VmaVirtualAllocationInfo {
     VkDeviceSize offset();
     VkDeviceSize size();
     void * pUserData();
 }
  • Field Details

    • SIZEOF

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

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

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

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

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

    • VmaVirtualAllocationInfo

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

      public long offset()
      offset of the allocation.

      Offset at which the allocation was made.

    • size

      public long size()
      size of the allocation.

      Same value as passed in VmaVirtualAllocationCreateInfo::size.

    • pUserData

      public long pUserData()
      custom pointer associated with the allocation.

      Same value as passed in VmaVirtualAllocationCreateInfo::pUserData or to SetVirtualAllocationUserData.

    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long noffset(long struct)
      Unsafe version of offset().
    • nsize

      public static long nsize(long struct)
      Unsafe version of size().
    • npUserData

      public static long npUserData(long struct)
      Unsafe version of pUserData().