public abstract class LwjglContext extends java.lang.Object implements JmeContext
JmeContext.Type
Modifier and Type | Field and Description |
---|---|
protected LwjglContext |
clContext |
protected LwjglPlatform |
clPlatform |
protected java.util.concurrent.atomic.AtomicBoolean |
created |
protected java.lang.Object |
createdLock |
protected JInputJoyInput |
joyInput |
protected LwjglKeyInput |
keyInput |
protected SystemListener |
listener |
protected LwjglMouseInput |
mouseInput |
protected java.util.concurrent.atomic.AtomicBoolean |
renderable |
protected Renderer |
renderer |
protected AppSettings |
settings |
protected static java.lang.String |
THREAD_NAME |
protected Timer |
timer |
Constructor and Description |
---|
LwjglContext() |
Modifier and Type | Method and Description |
---|---|
void |
create() |
protected org.lwjgl.opengl.ContextAttribs |
createContextAttribs() |
void |
destroy() |
protected int |
determineMaxSamples(int requestedSamples) |
protected int[] |
getGLVersion(java.lang.String renderer) |
protected int |
getNumSamplesToUse() |
Context |
getOpenCLContext() |
Renderer |
getRenderer() |
AppSettings |
getSettings() |
Timer |
getTimer() |
protected void |
initContextFirstTime()
Initializes the LWJGL renderer and input for the first time.
|
protected void |
initOpenCL() |
void |
internalCreate() |
void |
internalDestroy() |
boolean |
isCreated() |
boolean |
isRenderable() |
protected void |
loadNatives() |
protected void |
printContextInitInfo() |
protected void |
reinitContext()
Reinitializes the relevant details of the context.
|
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, destroy, getJoyInput, getKeyInput, getMouseInput, getTouchInput, getType, restart, setAutoFlushFrames, setTitle
protected static final java.lang.String THREAD_NAME
protected java.util.concurrent.atomic.AtomicBoolean created
protected java.util.concurrent.atomic.AtomicBoolean renderable
protected final java.lang.Object createdLock
protected AppSettings settings
protected Renderer renderer
protected LwjglKeyInput keyInput
protected LwjglMouseInput mouseInput
protected JInputJoyInput joyInput
protected Timer timer
protected SystemListener listener
protected LwjglPlatform clPlatform
protected LwjglContext clContext
public void setSystemListener(SystemListener listener)
JmeContext
setSystemListener
in interface JmeContext
listener
- the desired listenerprotected void printContextInitInfo()
protected int[] getGLVersion(java.lang.String renderer)
protected org.lwjgl.opengl.ContextAttribs createContextAttribs()
protected int determineMaxSamples(int requestedSamples)
protected void loadNatives()
protected int getNumSamplesToUse()
protected void reinitContext()
protected void initContextFirstTime()
protected void initOpenCL()
public void internalDestroy()
public void internalCreate()
public void create()
public void destroy()
protected void waitFor(boolean createdVal)
public boolean isCreated()
isCreated
in interface JmeContext
public boolean isRenderable()
isRenderable
in interface JmeContext
Renderer
are called
while this is false
, then the result is undefined.public void setSettings(AppSettings settings)
setSettings
in interface JmeContext
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.public AppSettings getSettings()
getSettings
in interface JmeContext
public Renderer getRenderer()
getRenderer
in interface JmeContext
public Timer getTimer()
getTimer
in interface JmeContext
public Context getOpenCLContext()
getOpenCLContext
in interface JmeContext