Class VkClearRect

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkClearRect>
org.lwjgl.vulkan.VkClearRect
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkClearRect extends org.lwjgl.system.Struct<VkClearRect> implements org.lwjgl.system.NativeResource
Structure specifying a clear rectangle.
Description

The layers [baseArrayLayer, baseArrayLayer + layerCount) counting from the base layer of the attachment image view are cleared.

See Also

VkRect2D, CmdClearAttachments

Layout


 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkClearRect>
    • rect

      public VkRect2D rect()
      the two-dimensional region to be cleared.
    • baseArrayLayer

      public int baseArrayLayer()
      the first layer to be cleared.
    • layerCount

      public int layerCount()
      the number of layers to clear.
    • 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.
    • mallocStack

      @Deprecated public static VkClearRect mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkClearRect callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkClearRect mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkClearRect callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkClearRect.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkClearRect.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkClearRect.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkClearRect.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static VkClearRect malloc(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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.