Class VkSparseMemoryBind

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkSparseMemoryBind extends Struct<VkSparseMemoryBind> implements NativeResource

 struct VkSparseMemoryBind {
     VkDeviceSize resourceOffset;
     VkDeviceSize size;
     VkDeviceMemory memory;
     VkDeviceSize memoryOffset;
     VkSparseMemoryBindFlags flags;
 }
  • Field Details

    • SIZEOF

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

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

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

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

      public static final int MEMORY
      The struct member offsets.
    • MEMORYOFFSET

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

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

    • VkSparseMemoryBind

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

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

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

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

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

      public int flags()
      Returns:
      the value of the flags field.
    • resourceOffset

      public VkSparseMemoryBind resourceOffset(long value)
      Sets the specified value to the resourceOffset field.
    • size

      public VkSparseMemoryBind size(long value)
      Sets the specified value to the size field.
    • memory

      public VkSparseMemoryBind memory(long value)
      Sets the specified value to the memory field.
    • memoryOffset

      public VkSparseMemoryBind memoryOffset(long value)
      Sets the specified value to the memoryOffset field.
    • flags

      public VkSparseMemoryBind flags(int value)
      Sets the specified value to the flags field.
    • set

      public VkSparseMemoryBind set(long resourceOffset, long size, long memory, long memoryOffset, int flags)
      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 VkSparseMemoryBind malloc()
      Returns a new VkSparseMemoryBind instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nresourceOffset(long struct)
      Unsafe version of resourceOffset().
    • nsize

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

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

      public static long nmemoryOffset(long struct)
      Unsafe version of memoryOffset().
    • nflags

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

      public static void nresourceOffset(long struct, long value)
      Unsafe version of resourceOffset.
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.
    • 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.
    • nflags

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