Class VkClearRect

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VkClearRect
    extends Struct
    implements 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

    Member documentation

    • rect – the two-dimensional region to be cleared.
    • baseArrayLayer – the first layer to be cleared.
    • layerCount – the number of layers to clear.

    Layout

    
     struct VkClearRect {
         VkRect2D rect;
         uint32_t baseArrayLayer;
         uint32_t layerCount;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • RECT, BASEARRAYLAYER, LAYERCOUNT

        The struct member offsets.
    • Constructor Detail

      • VkClearRect

        public VkClearRect​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • rect

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

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

        public int layerCount()
        Returns the value of the layerCount field.
      • 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
      • create

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

        @Nullable
        public static VkClearRect createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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

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

        public static VkClearRect callocStack()
        Returns a new VkClearRect instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • callocStack

        public static VkClearRect callocStack​(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
      • callocStack

        public static VkClearRect.Buffer callocStack​(int capacity)
        Returns a new VkClearRect.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static VkClearRect.Buffer callocStack​(int capacity,
                                                     MemoryStack stack)
        Returns a new VkClearRect.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.