public interface JmeContext
Modifier and Type | Interface and Description |
---|---|
static class |
JmeContext.Type
The type of context.
|
Modifier and Type | Method and Description |
---|---|
void |
create(boolean waitFor)
Creates the context and makes it active.
|
void |
destroy(boolean waitFor)
Destroys the context completely, making it inactive.
|
int |
getFramebufferHeight()
Returns the height of the framebuffer.
|
int |
getFramebufferWidth()
Returns the width of the framebuffer.
|
JoyInput |
getJoyInput() |
KeyInput |
getKeyInput() |
MouseInput |
getMouseInput() |
Context |
getOpenCLContext() |
Renderer |
getRenderer() |
AppSettings |
getSettings() |
SystemListener |
getSystemListener()
Accesses the listener that receives events related to this context.
|
Timer |
getTimer() |
TouchInput |
getTouchInput() |
JmeContext.Type |
getType() |
int |
getWindowXPosition()
Returns the screen X coordinate of the left edge of the content area.
|
int |
getWindowYPosition()
Returns the screen Y coordinate of the top edge of the content area.
|
boolean |
isCreated() |
boolean |
isRenderable() |
void |
restart()
Destroys and then re-creates the context.
|
void |
setAutoFlushFrames(boolean enabled) |
void |
setSettings(AppSettings settings) |
void |
setSystemListener(SystemListener listener)
Sets the listener that will receive events relating to context
creation, update, and destroy.
|
void |
setTitle(java.lang.String title)
Sets the title of the display (if available).
|
JmeContext.Type getType()
void setSettings(AppSettings settings)
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.SystemListener getSystemListener()
void setSystemListener(SystemListener listener)
listener
- the desired listenerAppSettings getSettings()
Renderer getRenderer()
Context getOpenCLContext()
MouseInput getMouseInput()
KeyInput getKeyInput()
JoyInput getJoyInput()
TouchInput getTouchInput()
Timer getTimer()
void setTitle(java.lang.String title)
title
- The new title of the display.boolean isCreated()
boolean isRenderable()
Renderer
are called
while this is false
, then the result is undefined.void setAutoFlushFrames(boolean enabled)
enabled
- If enabled, the context will automatically flush
frames to the video card (swap buffers) after an update cycle.void create(boolean waitFor)
waitFor
- If true, will wait until context has initialized.void restart()
void destroy(boolean waitFor)
waitFor
- If true, will wait until the context is destroyed fully.int getFramebufferHeight()
java.lang.IllegalStateException
- for a headless or null contextint getFramebufferWidth()
java.lang.IllegalStateException
- for a headless or null contextint getWindowXPosition()
java.lang.IllegalStateException
- for a headless or null contextint getWindowYPosition()
java.lang.IllegalStateException
- for a headless or null context