Class XrSwapchainSubImage

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

public class XrSwapchainSubImage extends org.lwjgl.system.Struct<XrSwapchainSubImage> implements org.lwjgl.system.NativeResource
  • Field Details

    • SIZEOF

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

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

      public static final int SWAPCHAIN
      The struct member offsets.
    • IMAGERECT

      public static final int IMAGERECT
      The struct member offsets.
    • IMAGEARRAYINDEX

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

    • XrSwapchainSubImage

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

      public long swapchain()
      the XrSwapchain to be displayed.
    • imageRect

      public XrRect2Di imageRect()
      an XrRect2Di representing the valid portion of the image to use, in pixels. It also implicitly defines the transform from normalized image coordinates into pixel coordinates. The coordinate origin depends on which graphics API is being used. See the graphics API extension details for more information on the coordinate origin definition. Note that the compositor may bleed in pixels from outside the bounds in some cases, for instance due to mipmapping.
    • imageArrayIndex

      public int imageArrayIndex()
      the image array index, with 0 meaning the first or only array element.
    • swapchain

      public XrSwapchainSubImage swapchain(XrSwapchain value)
      Sets the specified value to the swapchain() field.
    • imageRect

      public XrSwapchainSubImage imageRect(XrRect2Di value)
      Copies the specified XrRect2Di to the imageRect() field.
    • imageRect

      public XrSwapchainSubImage imageRect(Consumer<XrRect2Di> consumer)
      Passes the imageRect() field to the specified Consumer.
    • imageArrayIndex

      public XrSwapchainSubImage imageArrayIndex(int value)
      Sets the specified value to the imageArrayIndex() field.
    • set

      public XrSwapchainSubImage set(XrSwapchain swapchain, XrRect2Di imageRect, int imageArrayIndex)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nswapchain(long struct)
      Unsafe version of swapchain().
    • nimageRect

      public static XrRect2Di nimageRect(long struct)
      Unsafe version of imageRect().
    • nimageArrayIndex

      public static int nimageArrayIndex(long struct)
      Unsafe version of imageArrayIndex().
    • nswapchain

      public static void nswapchain(long struct, XrSwapchain value)
      Unsafe version of swapchain.
    • nimageRect

      public static void nimageRect(long struct, XrRect2Di value)
      Unsafe version of imageRect.
    • nimageArrayIndex

      public static void nimageArrayIndex(long struct, int value)
      Unsafe version of imageArrayIndex.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate