Class VkImageSubresource

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkImageSubresource extends Struct<VkImageSubresource> implements NativeResource

 struct VkImageSubresource {
     VkImageAspectFlags aspectMask;
     uint32_t mipLevel;
     uint32_t arrayLayer;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ASPECTMASK
      The struct member offsets.
    • MIPLEVEL

      public static final int MIPLEVEL
      The struct member offsets.
    • ARRAYLAYER

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

    • VkImageSubresource

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

      public int aspectMask()
      Returns:
      the value of the aspectMask field.
    • mipLevel

      public int mipLevel()
      Returns:
      the value of the mipLevel field.
    • arrayLayer

      public int arrayLayer()
      Returns:
      the value of the arrayLayer field.
    • aspectMask

      public VkImageSubresource aspectMask(int value)
      Sets the specified value to the aspectMask field.
    • mipLevel

      public VkImageSubresource mipLevel(int value)
      Sets the specified value to the mipLevel field.
    • arrayLayer

      public VkImageSubresource arrayLayer(int value)
      Sets the specified value to the arrayLayer field.
    • set

      public VkImageSubresource set(int aspectMask, int mipLevel, int arrayLayer)
      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 VkImageSubresource malloc()
      Returns a new VkImageSubresource instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int naspectMask(long struct)
      Unsafe version of aspectMask().
    • nmipLevel

      public static int nmipLevel(long struct)
      Unsafe version of mipLevel().
    • narrayLayer

      public static int narrayLayer(long struct)
      Unsafe version of arrayLayer().
    • naspectMask

      public static void naspectMask(long struct, int value)
      Unsafe version of aspectMask.
    • nmipLevel

      public static void nmipLevel(long struct, int value)
      Unsafe version of mipLevel.
    • narrayLayer

      public static void narrayLayer(long struct, int value)
      Unsafe version of arrayLayer.