Class VmaAllocationInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VmaAllocationInfo extends Struct<VmaAllocationInfo> implements NativeResource

 struct VmaAllocationInfo {
     uint32_t memoryType;
     VkDeviceMemory deviceMemory;
     VkDeviceSize offset;
     VkDeviceSize size;
     void * pMappedData;
     void * pUserData;
     char const * pName;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MEMORYTYPE
      The struct member offsets.
    • DEVICEMEMORY

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

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

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

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

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

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

    • VmaAllocationInfo

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

      public int memoryType()
      Returns:
      the value of the memoryType field.
    • deviceMemory

      public long deviceMemory()
      Returns:
      the value of the deviceMemory field.
    • offset

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

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

      public long pMappedData()
      Returns:
      the value of the pMappedData field.
    • pUserData

      public long pUserData()
      Returns:
      the value of the pUserData field.
    • pName

      public @Nullable ByteBuffer pName()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the pName field.
    • pNameString

      public @Nullable String pNameString()
      Returns:
      the null-terminated string pointed to by the pName field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nmemoryType(long struct)
      Unsafe version of memoryType().
    • ndeviceMemory

      public static long ndeviceMemory(long struct)
      Unsafe version of deviceMemory().
    • noffset

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

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

      public static long npMappedData(long struct)
      Unsafe version of pMappedData().
    • npUserData

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

      public static @Nullable ByteBuffer npName(long struct)
      Unsafe version of pName().
    • npNameString

      public static @Nullable String npNameString(long struct)
      Unsafe version of pNameString().