Class VkSubresourceLayout

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkSubresourceLayout extends Struct<VkSubresourceLayout> implements NativeResource

 struct VkSubresourceLayout {
     VkDeviceSize offset;
     VkDeviceSize size;
     VkDeviceSize rowPitch;
     VkDeviceSize arrayPitch;
     VkDeviceSize depthPitch;
 }
  • 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.
    • ROWPITCH

      public static final int ROWPITCH
      The struct member offsets.
    • ARRAYPITCH

      public static final int ARRAYPITCH
      The struct member offsets.
    • DEPTHPITCH

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

    • VkSubresourceLayout

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

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

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

      public long rowPitch()
      Returns:
      the value of the rowPitch field.
    • arrayPitch

      public long arrayPitch()
      Returns:
      the value of the arrayPitch field.
    • depthPitch

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

      public VkSubresourceLayout offset(long value)
      Sets the specified value to the offset field.
    • size

      public VkSubresourceLayout size(long value)
      Sets the specified value to the size field.
    • rowPitch

      public VkSubresourceLayout rowPitch(long value)
      Sets the specified value to the rowPitch field.
    • arrayPitch

      public VkSubresourceLayout arrayPitch(long value)
      Sets the specified value to the arrayPitch field.
    • depthPitch

      public VkSubresourceLayout depthPitch(long value)
      Sets the specified value to the depthPitch field.
    • set

      public VkSubresourceLayout set(long offset, long size, long rowPitch, long arrayPitch, long depthPitch)
      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 VkSubresourceLayout malloc()
      Returns a new VkSubresourceLayout instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nrowPitch(long struct)
      Unsafe version of rowPitch().
    • narrayPitch

      public static long narrayPitch(long struct)
      Unsafe version of arrayPitch().
    • ndepthPitch

      public static long ndepthPitch(long struct)
      Unsafe version of depthPitch().
    • noffset

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

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

      public static void nrowPitch(long struct, long value)
      Unsafe version of rowPitch.
    • narrayPitch

      public static void narrayPitch(long struct, long value)
      Unsafe version of arrayPitch.
    • ndepthPitch

      public static void ndepthPitch(long struct, long value)
      Unsafe version of depthPitch.