Class XrGraphicsBindingOpenGLXcbKHR

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

public class XrGraphicsBindingOpenGLXcbKHR extends org.lwjgl.system.Struct<XrGraphicsBindingOpenGLXcbKHR> implements org.lwjgl.system.NativeResource
The graphics binding structure to be passed at session creation to use OpenGL on X11 via XCB.
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 XrGraphicsBindingOpenGLXcbKHR in the next chain of the XrSessionCreateInfo.

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

Valid Usage (Implicit)
See Also

CreateSession

Layout


 struct XrGraphicsBindingOpenGLXcbKHR {
     XrStructureType type();
     void const * next();
     xcb_connection_t * connection();
     uint32_t screenNumber();
     xcb_glx_fbconfig_t fbconfigid();
     xcb_visualid_t visualid();
     xcb_glx_drawable_t glxDrawable();
     xcb_glx_context_t 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.
    • CONNECTION

      public static final int CONNECTION
      The struct member offsets.
    • SCREENNUMBER

      public static final int SCREENNUMBER
      The struct member offsets.
    • FBCONFIGID

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

      public static final int VISUALID
      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

    • XrGraphicsBindingOpenGLXcbKHR

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

      public long connection()
      a valid xcb_connection_t.
    • screenNumber

      public int screenNumber()
      an index indicating which screen should be used for rendering.
    • fbconfigid

      public int fbconfigid()
      a valid XCB OpenGL GLX xcb_glx_fbconfig_t.
    • visualid

      public int visualid()
      a valid XCB OpenGL GLX xcb_visualid_t.
    • glxDrawable

      public int glxDrawable()
      a valid XCB OpenGL GLX xcb_glx_drawable_t.
    • glxContext

      public int glxContext()
      a valid XCB OpenGL GLX xcb_glx_context_t.
    • type

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

      public XrGraphicsBindingOpenGLXcbKHR type$Default()
      Sets the TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR value to the type() field.
    • next

      public XrGraphicsBindingOpenGLXcbKHR next(long value)
      Sets the specified value to the next() field.
    • connection

      public XrGraphicsBindingOpenGLXcbKHR connection(long value)
      Sets the specified value to the connection() field.
    • screenNumber

      public XrGraphicsBindingOpenGLXcbKHR screenNumber(int value)
      Sets the specified value to the screenNumber() field.
    • fbconfigid

      public XrGraphicsBindingOpenGLXcbKHR fbconfigid(int value)
      Sets the specified value to the fbconfigid() field.
    • visualid

      public XrGraphicsBindingOpenGLXcbKHR visualid(int value)
      Sets the specified value to the visualid() field.
    • glxDrawable

      public XrGraphicsBindingOpenGLXcbKHR glxDrawable(int value)
      Sets the specified value to the glxDrawable() field.
    • glxContext

      public XrGraphicsBindingOpenGLXcbKHR glxContext(int value)
      Sets the specified value to the glxContext() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nconnection(long struct)
      Unsafe version of connection().
    • nscreenNumber

      public static int nscreenNumber(long struct)
      Unsafe version of screenNumber().
    • nfbconfigid

      public static int nfbconfigid(long struct)
      Unsafe version of fbconfigid().
    • nvisualid

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

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

      public static int 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.
    • nconnection

      public static void nconnection(long struct, long value)
      Unsafe version of connection.
    • nscreenNumber

      public static void nscreenNumber(long struct, int value)
      Unsafe version of screenNumber.
    • nfbconfigid

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

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

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

      public static void nglxContext(long struct, int 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