Class VkClearRect

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkClearRect extends Struct<VkClearRect> implements NativeResource

 struct VkClearRect {
     VkRect2D rect;
     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.
    • RECT

      public static final int RECT
      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

    • VkClearRect

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

      public VkRect2D rect()
      Returns:
      a VkRect2D view of the rect field.
    • baseArrayLayer

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

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

      public VkClearRect rect(VkRect2D value)
      Copies the specified VkRect2D to the rect field.
    • rect

      public VkClearRect rect(Consumer<VkRect2D> consumer)
      Passes the rect field to the specified Consumer.
    • baseArrayLayer

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

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

      public VkClearRect set(VkRect2D rect, int baseArrayLayer, int layerCount)
      Initializes this struct with the specified values.
    • set

      public VkClearRect set(VkClearRect src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static VkClearRect malloc()
      Returns a new VkClearRect instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static VkRect2D nrect(long struct)
      Unsafe version of rect().
    • nbaseArrayLayer

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

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

      public static void nrect(long struct, VkRect2D value)
      Unsafe version of rect.
    • 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.