Package gaiasky.vr.openxr
Class XrDriver
java.lang.Object
gaiasky.vr.openxr.XrDriver
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Handles initialization and lifecycle of OpenXR. Only active when Gaia Sky is run in VR mode.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionlong
boolean
long
long
org.lwjgl.openxr.XrViewConfigurationView.Buffer
final int
org.lwjgl.openxr.XrView.Buffer
org.lwjgl.openxr.XrSpace
org.lwjgl.openxr.XrDebugUtilsMessengerEXT
org.lwjgl.openxr.XrInstance
org.lwjgl.openxr.XrSession
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(XrInputListener listener) Adds aXrInputListener
to receive eventsvoid
check
(int result) void
void
checkNoException
(int result) void
checkNoException
(int result, String method) void
void
Creates the OpenXR instance object.void
Creates an XrSpace from the previously created session.void
Initializes the XR swapchains.void
dispose()
void
com.badlogic.gdx.utils.Array
<XrControllerDevice> int
boolean
long
int
getWidth()
org.lwjgl.openxr.XrGraphicsRequirementsOpenGLKHR
getXrGraphicsRequirements
(org.lwjgl.system.MemoryStack stack) boolean
void
void
void
initializeOpenXRSession
(long windowHandle) Creates the XrSession object.void
Creates the system with which to later create a session.boolean
boolean
Polls pending events in the OpenXR system.void
removeListener
(XrInputListener listener) Removes aXrInputListener
void
Renders the next frame with the current renderer.void
setRenderer
(XrRenderer renderer)
-
Field Details
-
systemId
public long systemId -
missingXrDebug
public boolean missingXrDebug -
runtimeName
-
runtimeVersionString
-
hmdName
-
systemString
-
runtimeVersion
public long runtimeVersion -
xrInstance
public org.lwjgl.openxr.XrInstance xrInstance -
xrSession
public org.lwjgl.openxr.XrSession xrSession -
xrDebugMessenger
public org.lwjgl.openxr.XrDebugUtilsMessengerEXT xrDebugMessenger -
xrAppSpace
public org.lwjgl.openxr.XrSpace xrAppSpace -
views
public org.lwjgl.openxr.XrView.Buffer views -
swapChains
-
viewConfigs
public org.lwjgl.openxr.XrViewConfigurationView.Buffer viewConfigs -
viewConfigType
public final int viewConfigType- See Also:
-
currentFrameTime
public long currentFrameTime
-
-
Constructor Details
-
XrDriver
public XrDriver()
-
-
Method Details
-
createOpenXRInstance
public void createOpenXRInstance()Creates the OpenXR instance object. First method to call in the OpenXR initialization sequence. -
initializeXRSystem
public void initializeXRSystem()Creates the system with which to later create a session. Second method to call in the OpenXR initialization sequence. -
getXrGraphicsRequirements
public org.lwjgl.openxr.XrGraphicsRequirementsOpenGLKHR getXrGraphicsRequirements(org.lwjgl.system.MemoryStack stack) -
checkOpenGL
public void checkOpenGL() -
initializeOpenXRSession
public void initializeOpenXRSession(long windowHandle) Creates the XrSession object. Third method to call in the OpenXR initialization sequence. -
createOpenXRReferenceSpace
public void createOpenXRReferenceSpace()Creates an XrSpace from the previously created session. Fourth method to call in the OpenXR initialization sequence. -
createOpenXRSwapchains
public void createOpenXRSwapchains()Initializes the XR swapchains. Fifth method to call in the OpenXR initialization sequence. -
initializeOpenGLFrameBuffers
public void initializeOpenGLFrameBuffers() -
initializeInput
public void initializeInput() -
renderFrameOpenXR
public void renderFrameOpenXR()Renders the next frame with the current renderer. -
getPath
-
getLastPollEventsResult
public boolean getLastPollEventsResult() -
pollEvents
public boolean pollEvents()Polls pending events in the OpenXR system.- Returns:
- True if we must stop, false otherwise.
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
disposeInput
public void disposeInput() -
check
- Throws:
IllegalStateException
-
check
-
checkNoException
public void checkNoException(int result) -
checkNoException
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getControllerDevices
-
addListener
Adds aXrInputListener
to receive events -
removeListener
Removes aXrInputListener
-
setRenderer
-
hasRenderer
public boolean hasRenderer() -
isRunning
public boolean isRunning()
-