Class VmaVirtualBlockCreateInfo

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

public class VmaVirtualBlockCreateInfo extends org.lwjgl.system.Struct<VmaVirtualBlockCreateInfo> implements org.lwjgl.system.NativeResource
Parameters of created VmaVirtualBlock object to be passed to CreateVirtualBlock.

Layout


 struct VmaVirtualBlockCreateInfo {
     VkDeviceSize size();
     VmaVirtualBlockCreateFlagBits flags();
     VkAllocationCallbacks const * pAllocationCallbacks();
 }
  • Field Details

    • SIZEOF

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

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

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

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

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

    • VmaVirtualBlockCreateInfo

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

      public long size()
      total size of the virtual block.

      Sizes can be expressed in bytes or any units you want as long as you are consistent in using them. For example, if you allocate from some array of structures, 1 can mean single instance of entire structure.

    • flags

      public int flags()
      use combination of VmaVirtualBlockCreateFlagBits. One or more of:
      VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BITVIRTUAL_BLOCK_CREATE_ALGORITHM_MASK
    • pAllocationCallbacks

      public @Nullable org.lwjgl.vulkan.VkAllocationCallbacks pAllocationCallbacks()
      custom CPU memory allocation callbacks. Optional.

      Optional, can be null. When specified, they will be used for all CPU-side memory allocations.

    • size

      public VmaVirtualBlockCreateInfo size(long value)
      Sets the specified value to the size() field.
    • flags

      public VmaVirtualBlockCreateInfo flags(int value)
      Sets the specified value to the flags() field.
    • pAllocationCallbacks

      public VmaVirtualBlockCreateInfo pAllocationCallbacks(@Nullable org.lwjgl.vulkan.VkAllocationCallbacks value)
      Sets the address of the specified VkAllocationCallbacks to the pAllocationCallbacks() field.
    • set

      public VmaVirtualBlockCreateInfo set(long size, int flags, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks pAllocationCallbacks)
      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 VmaVirtualBlockCreateInfo malloc()
      Returns a new VmaVirtualBlockCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static @Nullable org.lwjgl.vulkan.VkAllocationCallbacks npAllocationCallbacks(long struct)
      Unsafe version of pAllocationCallbacks().
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.
    • nflags

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

      public static void npAllocationCallbacks(long struct, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks value)
      Unsafe version of pAllocationCallbacks.