Package org.lwjgl.openxr
Class XrGraphicsBindingOpenGLXlibKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrGraphicsBindingOpenGLXlibKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrGraphicsBindingOpenGLXlibKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceThe graphics binding structure to be passed at session creation to use OpenGL on X11 via Xlib.Description
When creating an OpenGL-backed
XrSessionon any Linux/Unix platform that utilizes X11 and GLX, via the Xlib library, the application will provide a pointer to anXrGraphicsBindingOpenGLXlibKHRin thenextchain of theXrSessionCreateInfo.The required window system configuration define to expose this structure type is
USE_PLATFORM_XLIB.Valid Usage (Implicit)
- The
XR_KHR_opengl_enableextension must be enabled prior to usingXrGraphicsBindingOpenGLXlibKHR typemust beTYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHRnextmust beNULLor a valid pointer to the next structure in a structure chainxDisplaymust be a pointer to aDisplayvalueglxFBConfigmust be a validGLXFBConfigvalueglxDrawablemust be a validGLXDrawablevalueglxContextmust be a validGLXContextvalue
See Also
Layout
struct XrGraphicsBindingOpenGLXlibKHR { XrStructureTypetype(); void const *next(); Display *xDisplay(); uint32_tvisualid(); GLXFBConfigglxFBConfig(); GLXDrawableglxDrawable(); GLXContextglxContext(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrGraphicsBindingOpenGLXlibKHR.BufferAn array ofXrGraphicsBindingOpenGLXlibKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intGLXCONTEXT
GLXDRAWABLE
GLXFBCONFIG
NEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPE
VISUALID
XDISPLAYThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrGraphicsBindingOpenGLXlibKHR(java.nio.ByteBuffer container)Creates aXrGraphicsBindingOpenGLXlibKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrGraphicsBindingOpenGLXlibKHRcalloc()Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated withmemCalloc.static XrGraphicsBindingOpenGLXlibKHR.Buffercalloc(int capacity)Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated withmemCalloc.static XrGraphicsBindingOpenGLXlibKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrGraphicsBindingOpenGLXlibKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrGraphicsBindingOpenGLXlibKHRcreate()Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated withBufferUtils.static XrGraphicsBindingOpenGLXlibKHR.Buffercreate(int capacity)Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated withBufferUtils.static XrGraphicsBindingOpenGLXlibKHRcreate(long address)Returns a newXrGraphicsBindingOpenGLXlibKHRinstance for the specified memory address.static XrGraphicsBindingOpenGLXlibKHR.Buffercreate(long address, int capacity)Create aXrGraphicsBindingOpenGLXlibKHR.Bufferinstance at the specified memory.static XrGraphicsBindingOpenGLXlibKHRcreateSafe(long address)static XrGraphicsBindingOpenGLXlibKHR.BuffercreateSafe(long address, int capacity)longglxContext()a valid X11 OpenGL GLXGLXContext.XrGraphicsBindingOpenGLXlibKHRglxContext(long value)Sets the specified value to theglxContext()field.longglxDrawable()a valid X11 OpenGL GLXGLXDrawable.XrGraphicsBindingOpenGLXlibKHRglxDrawable(long value)Sets the specified value to theglxDrawable()field.longglxFBConfig()a valid X11 OpenGL GLXGLXFBConfig.XrGraphicsBindingOpenGLXlibKHRglxFBConfig(long value)Sets the specified value to theglxFBConfig()field.static XrGraphicsBindingOpenGLXlibKHRmalloc()Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated withmemAlloc.static XrGraphicsBindingOpenGLXlibKHR.Buffermalloc(int capacity)Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated withmemAlloc.static XrGraphicsBindingOpenGLXlibKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated on the specifiedMemoryStack.static XrGraphicsBindingOpenGLXlibKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrGraphicsBindingOpenGLXlibKHRnext(long value)Sets the specified value to thenext()field.static longnglxContext(long struct)Unsafe version ofglxContext().static voidnglxContext(long struct, long value)Unsafe version ofglxContext.static longnglxDrawable(long struct)Unsafe version ofglxDrawable().static voidnglxDrawable(long struct, long value)Unsafe version ofglxDrawable.static longnglxFBConfig(long struct)Unsafe version ofglxFBConfig().static voidnglxFBConfig(long struct, long value)Unsafe version ofglxFBConfig.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.static intnvisualid(long struct)Unsafe version ofvisualid().static voidnvisualid(long struct, int value)Unsafe version ofvisualid.static longnxDisplay(long struct)Unsafe version ofxDisplay().static voidnxDisplay(long struct, long value)Unsafe version ofxDisplay.XrGraphicsBindingOpenGLXlibKHRset(int type, long next, long xDisplay, int visualid, long glxFBConfig, long glxDrawable, long glxContext)Initializes this struct with the specified values.XrGraphicsBindingOpenGLXlibKHRset(XrGraphicsBindingOpenGLXlibKHR src)Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.XrGraphicsBindingOpenGLXlibKHRtype(int value)Sets the specified value to thetype()field.XrGraphicsBindingOpenGLXlibKHRtype$Default()Sets theTYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHRvalue to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.intvisualid()a valid X11 visual identifier.XrGraphicsBindingOpenGLXlibKHRvisualid(int value)Sets the specified value to thevisualid()field.longxDisplay()a valid X11Display.XrGraphicsBindingOpenGLXlibKHRxDisplay(long value)Sets the specified value to thexDisplay()field.
-
-
-
Constructor Detail
-
XrGraphicsBindingOpenGLXlibKHR
public XrGraphicsBindingOpenGLXlibKHR(java.nio.ByteBuffer container)
Creates aXrGraphicsBindingOpenGLXlibKHRinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
type
public int type()
theXrStructureTypeof this structure.
-
next
public long next()
NULLor 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 X11Display.
-
visualid
public int visualid()
a valid X11 visual identifier.
-
glxFBConfig
public long glxFBConfig()
a valid X11 OpenGL GLXGLXFBConfig.
-
glxDrawable
public long glxDrawable()
a valid X11 OpenGL GLXGLXDrawable.
-
glxContext
public long glxContext()
a valid X11 OpenGL GLXGLXContext.
-
type
public XrGraphicsBindingOpenGLXlibKHR type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrGraphicsBindingOpenGLXlibKHR type$Default()
Sets theTYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHRvalue to thetype()field.
-
next
public XrGraphicsBindingOpenGLXlibKHR next(long value)
Sets the specified value to thenext()field.
-
xDisplay
public XrGraphicsBindingOpenGLXlibKHR xDisplay(long value)
Sets the specified value to thexDisplay()field.
-
visualid
public XrGraphicsBindingOpenGLXlibKHR visualid(int value)
Sets the specified value to thevisualid()field.
-
glxFBConfig
public XrGraphicsBindingOpenGLXlibKHR glxFBConfig(long value)
Sets the specified value to theglxFBConfig()field.
-
glxDrawable
public XrGraphicsBindingOpenGLXlibKHR glxDrawable(long value)
Sets the specified value to theglxDrawable()field.
-
glxContext
public XrGraphicsBindingOpenGLXlibKHR glxContext(long value)
Sets the specified value to theglxContext()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
public XrGraphicsBindingOpenGLXlibKHR set(XrGraphicsBindingOpenGLXlibKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrGraphicsBindingOpenGLXlibKHR malloc()
Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrGraphicsBindingOpenGLXlibKHR calloc()
Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrGraphicsBindingOpenGLXlibKHR create()
Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated withBufferUtils.
-
create
public static XrGraphicsBindingOpenGLXlibKHR create(long address)
Returns a newXrGraphicsBindingOpenGLXlibKHRinstance for the specified memory address.
-
createSafe
@Nullable public static XrGraphicsBindingOpenGLXlibKHR createSafe(long address)
-
malloc
public static XrGraphicsBindingOpenGLXlibKHR.Buffer malloc(int capacity)
Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrGraphicsBindingOpenGLXlibKHR.Buffer calloc(int capacity)
Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrGraphicsBindingOpenGLXlibKHR.Buffer create(int capacity)
Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrGraphicsBindingOpenGLXlibKHR.Buffer create(long address, int capacity)
Create aXrGraphicsBindingOpenGLXlibKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrGraphicsBindingOpenGLXlibKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static XrGraphicsBindingOpenGLXlibKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrGraphicsBindingOpenGLXlibKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrGraphicsBindingOpenGLXlibKHRinstance allocated on the specifiedMemoryStackand 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 newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrGraphicsBindingOpenGLXlibKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrGraphicsBindingOpenGLXlibKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nnext
public static long nnext(long struct)
Unsafe version ofnext().
-
nxDisplay
public static long nxDisplay(long struct)
Unsafe version ofxDisplay().
-
nvisualid
public static int nvisualid(long struct)
Unsafe version ofvisualid().
-
nglxFBConfig
public static long nglxFBConfig(long struct)
Unsafe version ofglxFBConfig().
-
nglxDrawable
public static long nglxDrawable(long struct)
Unsafe version ofglxDrawable().
-
nglxContext
public static long nglxContext(long struct)
Unsafe version ofglxContext().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nxDisplay
public static void nxDisplay(long struct, long value)Unsafe version ofxDisplay.
-
nvisualid
public static void nvisualid(long struct, int value)Unsafe version ofvisualid.
-
nglxFBConfig
public static void nglxFBConfig(long struct, long value)Unsafe version ofglxFBConfig.
-
nglxDrawable
public static void nglxDrawable(long struct, long value)Unsafe version ofglxDrawable.
-
nglxContext
public static void nglxContext(long struct, long value)Unsafe version ofglxContext.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-