com.jme3.system.lwjgl
Class LwjglContext
java.lang.Object
com.jme3.system.lwjgl.LwjglContext
- All Implemented Interfaces:
- JmeContext
- Direct Known Subclasses:
- LwjglAbstractDisplay, LwjglOffscreenBuffer
public abstract class LwjglContext
- extends java.lang.Object
- implements JmeContext
A LWJGL implementation of a graphics context.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
created
protected java.util.concurrent.atomic.AtomicBoolean created
renderable
protected java.util.concurrent.atomic.AtomicBoolean renderable
createdLock
protected final java.lang.Object createdLock
settings
protected AppSettings settings
renderer
protected Renderer renderer
keyInput
protected LwjglKeyInput keyInput
mouseInput
protected LwjglMouseInput mouseInput
joyInput
protected JInputJoyInput joyInput
timer
protected Timer timer
listener
protected SystemListener listener
LwjglContext
public LwjglContext()
setSystemListener
public void setSystemListener(SystemListener listener)
- Description copied from interface:
JmeContext
- Sets the listener that will receive events relating to context
creation, update, and destroy.
- Specified by:
setSystemListener
in interface JmeContext
printContextInitInfo
protected void printContextInitInfo()
createContextAttribs
protected org.lwjgl.opengl.ContextAttribs createContextAttribs()
initContextFirstTime
protected void initContextFirstTime()
internalDestroy
public void internalDestroy()
internalCreate
public void internalCreate()
create
public void create()
destroy
public void destroy()
waitFor
protected void waitFor(boolean createdVal)
isCreated
public boolean isCreated()
- Specified by:
isCreated
in interface JmeContext
- Returns:
- True if the context has been created but not yet destroyed.
isRenderable
public boolean isRenderable()
- Specified by:
isRenderable
in interface JmeContext
- Returns:
- True if the context contains a valid render surface,
if any of the rendering methods in
Renderer
are called
while this is false
, then the result is undefined.
setSettings
public void setSettings(AppSettings settings)
- Specified by:
setSettings
in interface JmeContext
- Parameters:
settings
- the display settings to use for the created context. If
the context has already been created, then restart()
must be called
for the changes to be applied.
getSettings
public AppSettings getSettings()
- Specified by:
getSettings
in interface JmeContext
- 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
public Renderer getRenderer()
- Specified by:
getRenderer
in interface JmeContext
- Returns:
- The renderer for this context, or null if not created yet.
getTimer
public Timer getTimer()
- Specified by:
getTimer
in interface JmeContext
- Returns:
- The timer for this context, or null if not created yet.