Class VkImageSubresourceRange

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkImageSubresourceRange extends Struct<VkImageSubresourceRange> implements NativeResource

 struct VkImageSubresourceRange {
     VkImageAspectFlags aspectMask;
     uint32_t baseMipLevel;
     uint32_t levelCount;
     uint32_t baseArrayLayer;
     uint32_t layerCount;
 }
  • 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.
    • BASEMIPLEVEL

      public static final int BASEMIPLEVEL
      The struct member offsets.
    • LEVELCOUNT

      public static final int LEVELCOUNT
      The struct member offsets.
    • BASEARRAYLAYER

      public static final int BASEARRAYLAYER
      The struct member offsets.
    • LAYERCOUNT

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

    • VkImageSubresourceRange

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

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

      public int baseMipLevel()
      Returns:
      the value of the baseMipLevel field.
    • levelCount

      public int levelCount()
      Returns:
      the value of the levelCount field.
    • baseArrayLayer

      public int baseArrayLayer()
      Returns:
      the value of the baseArrayLayer field.
    • layerCount

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

      public VkImageSubresourceRange aspectMask(int value)
      Sets the specified value to the aspectMask field.
    • baseMipLevel

      public VkImageSubresourceRange baseMipLevel(int value)
      Sets the specified value to the baseMipLevel field.
    • levelCount

      public VkImageSubresourceRange levelCount(int value)
      Sets the specified value to the levelCount field.
    • baseArrayLayer

      public VkImageSubresourceRange baseArrayLayer(int value)
      Sets the specified value to the baseArrayLayer field.
    • layerCount

      public VkImageSubresourceRange layerCount(int value)
      Sets the specified value to the layerCount field.
    • set

      public VkImageSubresourceRange set(int aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
      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 VkImageSubresourceRange malloc()
      Returns a new VkImageSubresourceRange instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nbaseMipLevel(long struct)
      Unsafe version of baseMipLevel().
    • nlevelCount

      public static int nlevelCount(long struct)
      Unsafe version of levelCount().
    • nbaseArrayLayer

      public static int nbaseArrayLayer(long struct)
      Unsafe version of baseArrayLayer().
    • nlayerCount

      public static int nlayerCount(long struct)
      Unsafe version of layerCount().
    • naspectMask

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

      public static void nbaseMipLevel(long struct, int value)
      Unsafe version of baseMipLevel.
    • nlevelCount

      public static void nlevelCount(long struct, int value)
      Unsafe version of levelCount.
    • nbaseArrayLayer

      public static void nbaseArrayLayer(long struct, int value)
      Unsafe version of baseArrayLayer.
    • nlayerCount

      public static void nlayerCount(long struct, int value)
      Unsafe version of layerCount.