Class VmaAllocationCreateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VmaAllocationCreateInfo extends Struct<VmaAllocationCreateInfo> implements NativeResource
struct VmaAllocationCreateInfo {
    VmaAllocationCreateFlags flags;
    VmaMemoryUsage usage;
    VkMemoryPropertyFlags requiredFlags;
    VkMemoryPropertyFlags preferredFlags;
    uint32_t memoryTypeBits;
    VmaPool pool;
    void * pUserData;
    float priority;
}
  • Field Details

    • SIZEOF

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

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

      public static final int FLAGS
      The struct member offsets.
    • USAGE

      public static final int USAGE
      The struct member offsets.
    • REQUIREDFLAGS

      public static final int REQUIREDFLAGS
      The struct member offsets.
    • PREFERREDFLAGS

      public static final int PREFERREDFLAGS
      The struct member offsets.
    • MEMORYTYPEBITS

      public static final int MEMORYTYPEBITS
      The struct member offsets.
    • POOL

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

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

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

    • VmaAllocationCreateInfo

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

      @NativeType("VmaAllocationCreateFlags") public int flags()
      Returns:
      the value of the flags field.
    • usage

      @NativeType("VmaMemoryUsage") public int usage()
      Returns:
      the value of the usage field.
    • requiredFlags

      @NativeType("VkMemoryPropertyFlags") public int requiredFlags()
      Returns:
      the value of the requiredFlags field.
    • preferredFlags

      @NativeType("VkMemoryPropertyFlags") public int preferredFlags()
      Returns:
      the value of the preferredFlags field.
    • memoryTypeBits

      @NativeType("uint32_t") public int memoryTypeBits()
      Returns:
      the value of the memoryTypeBits field.
    • pool

      @NativeType("VmaPool") public long pool()
      Returns:
      the value of the pool field.
    • pUserData

      @NativeType("void *") public long pUserData()
      Returns:
      the value of the pUserData field.
    • priority

      public float priority()
      Returns:
      the value of the priority field.
    • flags

      public VmaAllocationCreateInfo flags(@NativeType("VmaAllocationCreateFlags") int value)
      Sets the specified value to the flags field.
    • usage

      public VmaAllocationCreateInfo usage(@NativeType("VmaMemoryUsage") int value)
      Sets the specified value to the usage field.
    • requiredFlags

      public VmaAllocationCreateInfo requiredFlags(@NativeType("VkMemoryPropertyFlags") int value)
      Sets the specified value to the requiredFlags field.
    • preferredFlags

      public VmaAllocationCreateInfo preferredFlags(@NativeType("VkMemoryPropertyFlags") int value)
      Sets the specified value to the preferredFlags field.
    • memoryTypeBits

      public VmaAllocationCreateInfo memoryTypeBits(@NativeType("uint32_t") int value)
      Sets the specified value to the memoryTypeBits field.
    • pool

      public VmaAllocationCreateInfo pool(@NativeType("VmaPool") long value)
      Sets the specified value to the pool field.
    • pUserData

      public VmaAllocationCreateInfo pUserData(@NativeType("void *") long value)
      Sets the specified value to the pUserData field.
    • priority

      public VmaAllocationCreateInfo priority(float value)
      Sets the specified value to the priority field.
    • set

      public VmaAllocationCreateInfo set(int flags, int usage, int requiredFlags, int preferredFlags, int memoryTypeBits, long pool, long pUserData, float priority)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nflags(long struct)
      Unsafe version of flags().
    • nusage

      public static int nusage(long struct)
      Unsafe version of usage().
    • nrequiredFlags

      public static int nrequiredFlags(long struct)
      Unsafe version of requiredFlags().
    • npreferredFlags

      public static int npreferredFlags(long struct)
      Unsafe version of preferredFlags().
    • nmemoryTypeBits

      public static int nmemoryTypeBits(long struct)
      Unsafe version of memoryTypeBits().
    • npool

      public static long npool(long struct)
      Unsafe version of pool().
    • npUserData

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

      public static float npriority(long struct)
      Unsafe version of priority().
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nusage

      public static void nusage(long struct, int value)
      Unsafe version of usage.
    • nrequiredFlags

      public static void nrequiredFlags(long struct, int value)
      Unsafe version of requiredFlags.
    • npreferredFlags

      public static void npreferredFlags(long struct, int value)
      Unsafe version of preferredFlags.
    • nmemoryTypeBits

      public static void nmemoryTypeBits(long struct, int value)
      Unsafe version of memoryTypeBits.
    • npool

      public static void npool(long struct, long value)
      Unsafe version of pool.
    • npUserData

      public static void npUserData(long struct, long value)
      Unsafe version of pUserData.
    • npriority

      public static void npriority(long struct, float value)
      Unsafe version of priority.