Package com.jme3.system.lwjgl
Class LwjglContextVR
java.lang.Object
com.jme3.system.lwjgl.LwjglContextVR
- All Implemented Interfaces:
JmeContext
- Direct Known Subclasses:
LwjglWindowVR
A VR oriented LWJGL implementation of a graphics context.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.system.JmeContext
JmeContext.Type
-
Field Summary
Modifier and TypeFieldDescriptionprotected AtomicBoolean
protected final Object
protected GlfwJoystickInput
protected GlfwKeyInputVR
protected SystemListener
protected GlfwMouseInputVR
protected AtomicBoolean
protected Renderer
protected AppSettings
protected static final String
protected Timer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Create the context.void
destroy()
Destroy the context.protected int
protected int
Accesses the listener that receives events related to this context.getTimer()
protected void
void
Context internal create.void
Context internal destroy.boolean
boolean
boolean
Check if the display is a retina display.protected void
protected void
void
setSettings
(AppSettings settings) void
setSystemListener
(SystemListener listener) Sets the listener that will receive events relating to context creation, update, and destroy.protected void
waitFor
(boolean createdVal) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jme3.system.JmeContext
create, destroy, getFramebufferHeight, getFramebufferWidth, getJoyInput, getKeyInput, getMouseInput, getOpenCLContext, getTouchInput, getType, getWindowXPosition, getWindowYPosition, restart, setAutoFlushFrames, setTitle
-
Field Details
-
THREAD_NAME
- See Also:
-
created
-
renderable
-
createdLock
-
settings
-
renderer
-
keyInput
-
mouseInput
-
joyInput
-
timer
-
listener
-
-
Constructor Details
-
LwjglContextVR
public LwjglContextVR()
-
-
Method Details
-
getSystemListener
Accesses the listener that receives events related to this context.- Specified by:
getSystemListener
in interfaceJmeContext
- Returns:
- the pre-existing instance
-
setSystemListener
Description copied from interface:JmeContext
Sets the listener that will receive events relating to context creation, update, and destroy.- Specified by:
setSystemListener
in interfaceJmeContext
- Parameters:
listener
- the desired listener
-
printContextInitInfo
protected void printContextInitInfo() -
determineMaxSamples
protected int determineMaxSamples() -
loadNatives
protected void loadNatives() -
isRetinaDisplay
public boolean isRetinaDisplay()Check if the display is a retina display.- Returns:
true
if the display is a retina display andfalse
otherwise.
-
getNumSamplesToUse
protected int getNumSamplesToUse() -
initContextFirstTime
protected void initContextFirstTime() -
internalDestroy
public void internalDestroy()Context internal destroy. -
internalCreate
public void internalCreate()Context internal create. -
create
public void create()Create the context. -
destroy
public void destroy()Destroy the context. -
waitFor
protected void waitFor(boolean createdVal) - Parameters:
createdVal
-
-
isCreated
public boolean isCreated()- Specified by:
isCreated
in interfaceJmeContext
- Returns:
- True if the context has been created but not yet destroyed.
-
isRenderable
public boolean isRenderable()- Specified by:
isRenderable
in interfaceJmeContext
- Returns:
- True if the context contains a valid render surface,
if any of the rendering methods in
Renderer
are called while this isfalse
, then the result is undefined.
-
setSettings
- Specified by:
setSettings
in interfaceJmeContext
- Parameters:
settings
- the display settings to use for the created context. If the context has already been created, thenrestart()
must be called for the changes to be applied.
-
getSettings
- Specified by:
getSettings
in interfaceJmeContext
- Returns:
- The current display settings. Note that they might be different from the ones set with setDisplaySettings() if the context was restarted or the settings changed internally.
-
getRenderer
- Specified by:
getRenderer
in interfaceJmeContext
- Returns:
- The renderer for this context, or null if not created yet.
-
getTimer
- Specified by:
getTimer
in interfaceJmeContext
- Returns:
- The timer for this context, or null if not created yet.
-