Class VkRectLayerKHR

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

    public class VkRectLayerKHR
    extends Struct
    implements NativeResource
    Structure containing a rectangle, including layer, changed by vkQueuePresentKHR for a given VkImage.
    Valid Usage

    Some platforms allow the size of a surface to change, and then scale the pixels of the image to fit the surface. VkRectLayerKHR specifies pixels of the swapchain's image(s), which will be constant for the life of the swapchain.

    See Also

    VkExtent2D, VkOffset2D, VkPresentRegionKHR

    Member documentation

    • offset – the origin of the rectangle, in pixels.
    • extent – the size of the rectangle, in pixels.
    • layer – the layer of the image. For images with only one layer, the value of layer must be 0.

    Layout

    
     struct VkRectLayerKHR {
         VkOffset2D offset;
         VkExtent2D extent;
         uint32_t layer;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • OFFSET, EXTENT, LAYER

        The struct member offsets.
    • Constructor Detail

      • VkRectLayerKHR

        public VkRectLayerKHR​(java.nio.ByteBuffer container)
        Creates a VkRectLayerKHR 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
      • layer

        public int layer()
        Returns the value of the layer field.
      • offset

        public VkRectLayerKHR offset​(java.util.function.Consumer<VkOffset2D> consumer)
        Passes the offset field to the specified Consumer.
      • extent

        public VkRectLayerKHR extent​(java.util.function.Consumer<VkExtent2D> consumer)
        Passes the extent field to the specified Consumer.
      • layer

        public VkRectLayerKHR layer​(int value)
        Sets the specified value to the layer field.
      • set

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

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

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

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

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

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

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

        public static VkRectLayerKHR mallocStack()
        Returns a new VkRectLayerKHR instance allocated on the thread-local MemoryStack.
      • callocStack

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

        public static VkRectLayerKHR mallocStack​(MemoryStack stack)
        Returns a new VkRectLayerKHR instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

        public static int nlayer​(long struct)
        Unsafe version of layer().
      • noffset

        public static void noffset​(long struct,
                                   VkOffset2D value)
        Unsafe version of offset.
      • nextent

        public static void nextent​(long struct,
                                   VkExtent2D value)
        Unsafe version of extent.
      • nlayer

        public static void nlayer​(long struct,
                                  int value)
        Unsafe version of layer.