Class VkRectLayerKHR

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

public class VkRectLayerKHR extends org.lwjgl.system.Struct<VkRectLayerKHR> implements org.lwjgl.system.NativeResource
Structure containing a rectangle, including layer, changed by vkQueuePresentKHR for a given VkImage.
Description

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.

Valid Usage
See Also

VkExtent2D, VkOffset2D, VkPresentRegionKHR

Layout


 struct VkRectLayerKHR {
     VkOffset2D offset();
     VkExtent2D extent();
     uint32_t layer();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • OFFSET

      public static final int OFFSET
      The struct member offsets.
    • EXTENT

      public static final int EXTENT
      The struct member offsets.
    • LAYER

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

    • VkRectLayerKHR

      public VkRectLayerKHR(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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkRectLayerKHR>
    • offset

      public VkOffset2D offset()
      the origin of the rectangle, in pixels.
    • extent

      public VkExtent2D extent()
      the size of the rectangle, in pixels.
    • layer

      public int layer()
      the layer of the image. For images with only one layer, the value of layer must be 0.
    • offset

      public VkRectLayerKHR offset(VkOffset2D value)
      Copies the specified VkOffset2D to the offset() field.
    • offset

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

      public VkRectLayerKHR extent(VkExtent2D value)
      Copies the specified VkExtent2D to the extent() field.
    • extent

      public VkRectLayerKHR extent(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(VkOffset2D offset, VkExtent2D extent, int layer)
      Initializes this struct with the specified values.
    • 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()
      Returns a new VkRectLayerKHR instance allocated with BufferUtils.
    • create

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

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

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

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

      public static VkRectLayerKHR.Buffer create(int capacity)
      Returns a new VkRectLayerKHR.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • 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

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

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

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

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

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

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

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

      @Deprecated public static VkRectLayerKHR.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 VkRectLayerKHR.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 VkRectLayerKHR malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkRectLayerKHR instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkRectLayerKHR calloc(org.lwjgl.system.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
    • malloc

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

      public static VkRectLayerKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkRectLayerKHR.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
    • noffset

      public static VkOffset2D noffset(long struct)
      Unsafe version of offset().
    • nextent

      public static VkExtent2D nextent(long struct)
      Unsafe version of extent().
    • 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.