Class XrGraphicsBindingOpenGLWin32KHR

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

    public class XrGraphicsBindingOpenGLWin32KHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    The graphics binding structure to be passed at session creation to use OpenGL on Windows.
    Description

    When creating an OpenGL-backed XrSession on Microsoft Windows, the application will provide a pointer to an XrGraphicsBindingOpenGLWin32KHR in the next chain of the XrSessionCreateInfo. As no standardized way exists for OpenGL to create the graphics context on a specific GPU, the runtime must assume that the application uses the operating systems default GPU. If the GPU used by the runtime does not match the GPU on which the OpenGL context of the application got created, CreateSession must return ERROR_GRAPHICS_DEVICE_INVALID.

    The required window system configuration define to expose this structure type is USE_PLATFORM_WIN32.

    Valid Usage (Implicit)
    See Also

    CreateSession

    Layout

    
     struct XrGraphicsBindingOpenGLWin32KHR {
         XrStructureType type();
         void const * next();
         HDC hDC();
         HGLRC hGLRC();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, NEXT, HDC, HGLRC

        The struct member offsets.
    • Constructor Detail

      • XrGraphicsBindingOpenGLWin32KHR

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