Class XrGraphicsBindingOpenGLWin32KHR

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

public class XrGraphicsBindingOpenGLWin32KHR extends org.lwjgl.system.Struct<XrGraphicsBindingOpenGLWin32KHR> 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 Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • HDC

      public static final int HDC
      The struct member offsets.
    • HGLRC

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

    • XrGraphicsBindingOpenGLWin32KHR

      public XrGraphicsBindingOpenGLWin32KHR(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.

  • Method Details