Class XrGraphicsBindingOpenGLXlibKHR

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

public class XrGraphicsBindingOpenGLXlibKHR extends org.lwjgl.system.Struct<XrGraphicsBindingOpenGLXlibKHR> implements org.lwjgl.system.NativeResource
The graphics binding structure to be passed at session creation to use OpenGL on X11 via Xlib.
Description

When creating an OpenGL-backed XrSession on any Linux/Unix platform that utilizes X11 and GLX, via the Xlib library, the application will provide a pointer to an XrGraphicsBindingOpenGLXlibKHR in the next chain of the XrSessionCreateInfo.

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

Valid Usage (Implicit)
See Also

CreateSession

Layout


 struct XrGraphicsBindingOpenGLXlibKHR {
     XrStructureType type();
     void const * next();
     Display * xDisplay();
     uint32_t visualid();
     GLXFBConfig glxFBConfig();
     GLXDrawable glxDrawable();
     GLXContext glxContext();
 }
  • 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.
    • XDISPLAY

      public static final int XDISPLAY
      The struct member offsets.
    • VISUALID

      public static final int VISUALID
      The struct member offsets.
    • GLXFBCONFIG

      public static final int GLXFBCONFIG
      The struct member offsets.
    • GLXDRAWABLE

      public static final int GLXDRAWABLE
      The struct member offsets.
    • GLXCONTEXT

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

    • XrGraphicsBindingOpenGLXlibKHR

      public XrGraphicsBindingOpenGLXlibKHR(ByteBuffer container)
      Creates a XrGraphicsBindingOpenGLXlibKHR 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<XrGraphicsBindingOpenGLXlibKHR>
    • 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.
    • xDisplay

      public long xDisplay()
      a valid X11 Display.
    • visualid

      public int visualid()
      a valid X11 visual identifier.
    • glxFBConfig

      public long glxFBConfig()
      a valid X11 OpenGL GLX GLXFBConfig.
    • glxDrawable

      public long glxDrawable()
      a valid X11 OpenGL GLX GLXDrawable.
    • glxContext

      public long glxContext()
      a valid X11 OpenGL GLX GLXContext.
    • type

      public XrGraphicsBindingOpenGLXlibKHR type(int value)
      Sets the specified value to the type() field.
    • type$Default

      public XrGraphicsBindingOpenGLXlibKHR type$Default()
      Sets the TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR value to the type() field.
    • next

      public XrGraphicsBindingOpenGLXlibKHR next(long value)
      Sets the specified value to the next() field.
    • xDisplay

      public XrGraphicsBindingOpenGLXlibKHR xDisplay(long value)
      Sets the specified value to the xDisplay() field.
    • visualid

      public XrGraphicsBindingOpenGLXlibKHR visualid(int value)
      Sets the specified value to the visualid() field.
    • glxFBConfig

      public XrGraphicsBindingOpenGLXlibKHR glxFBConfig(long value)
      Sets the specified value to the glxFBConfig() field.
    • glxDrawable

      public XrGraphicsBindingOpenGLXlibKHR glxDrawable(long value)
      Sets the specified value to the glxDrawable() field.
    • glxContext

      public XrGraphicsBindingOpenGLXlibKHR glxContext(long value)
      Sets the specified value to the glxContext() field.
    • set

      public XrGraphicsBindingOpenGLXlibKHR set(int type, long next, long xDisplay, int visualid, long glxFBConfig, long glxDrawable, long glxContext)
      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 XrGraphicsBindingOpenGLXlibKHR malloc()
      Returns a new XrGraphicsBindingOpenGLXlibKHR instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nxDisplay(long struct)
      Unsafe version of xDisplay().
    • nvisualid

      public static int nvisualid(long struct)
      Unsafe version of visualid().
    • nglxFBConfig

      public static long nglxFBConfig(long struct)
      Unsafe version of glxFBConfig().
    • nglxDrawable

      public static long nglxDrawable(long struct)
      Unsafe version of glxDrawable().
    • nglxContext

      public static long nglxContext(long struct)
      Unsafe version of glxContext().
    • 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.
    • nxDisplay

      public static void nxDisplay(long struct, long value)
      Unsafe version of xDisplay.
    • nvisualid

      public static void nvisualid(long struct, int value)
      Unsafe version of visualid.
    • nglxFBConfig

      public static void nglxFBConfig(long struct, long value)
      Unsafe version of glxFBConfig.
    • nglxDrawable

      public static void nglxDrawable(long struct, long value)
      Unsafe version of glxDrawable.
    • nglxContext

      public static void nglxContext(long struct, long value)
      Unsafe version of glxContext.
    • validate

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