Class XrSwapchainImageOpenGLKHR

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

    public class XrSwapchainImageOpenGLKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    OpenGL-specific swapchain image structure.
    Description

    If a given session was created with a stext:XrGraphicsBindingOpenGL*KHR, the following conditions must apply.

    The OpenXR runtime must interpret the bottom-left corner of the swapchain image as the coordinate origin unless specified otherwise by extension functionality.

    The OpenXR runtime must interpret the swapchain images in a clip space of positive Y pointing up, near Z plane at -1, and far Z plane at 1.

    Valid Usage (Implicit)
    See Also

    XrSwapchainImageBaseHeader

    Layout

    
     struct XrSwapchainImageOpenGLKHR {
         XrStructureType type();
         void * next();
         uint32_t image();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, NEXT, IMAGE

        The struct member offsets.
    • Constructor Detail

      • XrSwapchainImageOpenGLKHR

        public XrSwapchainImageOpenGLKHR​(java.nio.ByteBuffer container)
        Creates a XrSwapchainImageOpenGLKHR 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • type

        public int type()
        the XrStructureType of this structure.
      • next

        public long next()
        NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
      • image

        public int image()
        the OpenGL texture handle associated with this swapchain image.
      • set

        public XrSwapchainImageOpenGLKHR set​(int type,
                                             long next,
                                             int image)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

        public static int ntype​(long struct)
        Unsafe version of type().
      • nnext

        public static long nnext​(long struct)
        Unsafe version of next().
      • nimage

        public static int nimage​(long struct)
        Unsafe version of image().
      • ntype

        public static void ntype​(long struct,
                                 int value)
        Unsafe version of type.
      • nnext

        public static void nnext​(long struct,
                                 long value)
        Unsafe version of next.
      • nimage

        public static void nimage​(long struct,
                                  int value)
        Unsafe version of image.