|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.system.android.OGLESContext
public class OGLESContext
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.jme3.system.JmeContext |
---|
JmeContext.Type |
Field Summary | |
---|---|
protected AndroidInput |
androidInput
|
protected boolean |
autoFlush
|
protected int |
clientOpenGLESVersion
EGL_RENDERABLE_TYPE: EGL_OPENGL_ES_BIT = OpenGL ES 1.0 | EGL_OPENGL_ES2_BIT = OpenGL ES 2.0 |
protected java.util.concurrent.atomic.AtomicBoolean |
created
|
protected SystemListener |
listener
|
protected int |
minFrameDuration
|
protected java.util.concurrent.atomic.AtomicBoolean |
needClose
|
protected java.util.concurrent.atomic.AtomicBoolean |
renderable
|
protected OGLESShaderRenderer |
renderer
|
protected AppSettings |
settings
|
protected Timer |
timer
|
protected AndroidGLSurfaceView |
view
|
Fields inherited from interface com.jme3.input.SoftTextDialogInput |
---|
NUMERIC_ENTRY_DIALOG, NUMERIC_KEYPAD_DIALOG, TEXT_ENTRY_DIALOG |
Constructor Summary | |
---|---|
OGLESContext()
|
Method Summary | |
---|---|
void |
create()
|
void |
create(boolean waitFor)
Creates the context and makes it active. |
android.opengl.GLSurfaceView |
createView(AndroidConfigChooser.ConfigType configType,
boolean eglConfigVerboseLogging)
createView creates the GLSurfaceView that the
renderer will draw to. |
protected void |
deinitInThread()
De-initialize in the OpenGL thread. |
void |
destroy()
|
void |
destroy(boolean waitFor)
Destroys the context completely, making it inactive. |
int |
getClientOpenGLESVersion()
|
JoyInput |
getJoyInput()
|
KeyInput |
getKeyInput()
|
MouseInput |
getMouseInput()
|
Renderer |
getRenderer()
|
AppSettings |
getSettings()
|
Timer |
getTimer()
|
TouchInput |
getTouchInput()
|
JmeContext.Type |
getType()
|
protected void |
initInThread()
|
boolean |
isCreated()
|
boolean |
isRenderable()
|
void |
onDrawFrame(javax.microedition.khronos.opengles.GL10 gl)
|
void |
onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl,
int width,
int height)
|
void |
onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl,
javax.microedition.khronos.egl.EGLConfig cfg)
|
void |
requestDialog(int id,
java.lang.String title,
java.lang.String initialValue,
SoftTextDialogInputListener listener)
|
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). |
protected void |
waitFor(boolean createdVal)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.concurrent.atomic.AtomicBoolean created
protected final java.util.concurrent.atomic.AtomicBoolean renderable
protected final java.util.concurrent.atomic.AtomicBoolean needClose
protected final AppSettings settings
protected OGLESShaderRenderer renderer
protected Timer timer
protected SystemListener listener
protected boolean autoFlush
protected AndroidInput androidInput
protected AndroidGLSurfaceView view
protected int minFrameDuration
protected int clientOpenGLESVersion
Constructor Detail |
---|
public OGLESContext()
Method Detail |
---|
public JmeContext.Type getType()
getType
in interface JmeContext
public android.opengl.GLSurfaceView createView(AndroidConfigChooser.ConfigType configType, boolean eglConfigVerboseLogging)
createView
creates the GLSurfaceView that the
renderer will draw to.
The result GLSurfaceView will receive input events and forward them to the Application. Any rendering will be done into the GLSurfaceView. Only one GLSurfaceView can be created at this time. The given configType specifies how to determine the display configuration.
configType
- ConfigType.FASTEST (Default) | ConfigType.LEGACY |
ConfigType.BESTeglConfigVerboseLogging
- if true show all found configs
public void onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl, javax.microedition.khronos.egl.EGLConfig cfg)
onSurfaceCreated
in interface android.opengl.GLSurfaceView.Renderer
protected void initInThread()
protected void deinitInThread()
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 void setSystemListener(SystemListener listener)
JmeContext
setSystemListener
in interface JmeContext
public AppSettings getSettings()
getSettings
in interface JmeContext
public Renderer getRenderer()
getRenderer
in interface JmeContext
public MouseInput getMouseInput()
getMouseInput
in interface JmeContext
public KeyInput getKeyInput()
getKeyInput
in interface JmeContext
public JoyInput getJoyInput()
getJoyInput
in interface JmeContext
public TouchInput getTouchInput()
getTouchInput
in interface JmeContext
public Timer getTimer()
getTimer
in interface JmeContext
public void setTitle(java.lang.String title)
JmeContext
setTitle
in interface JmeContext
title
- The new title of the display.public boolean isCreated()
isCreated
in interface JmeContext
public void setAutoFlushFrames(boolean enabled)
setAutoFlushFrames
in interface JmeContext
enabled
- If enabled, the context will automatically flush
frames to the video card (swap buffers) after an update cycle.public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl, int width, int height)
onSurfaceChanged
in interface android.opengl.GLSurfaceView.Renderer
public void onDrawFrame(javax.microedition.khronos.opengles.GL10 gl)
onDrawFrame
in interface android.opengl.GLSurfaceView.Renderer
public boolean isRenderable()
isRenderable
in interface JmeContext
Renderer
are called
while this is false
, then the result is undefined.public void create(boolean waitFor)
JmeContext
create
in interface JmeContext
waitFor
- If true, will wait until context has initialized.public void create()
public void restart()
JmeContext
restart
in interface JmeContext
public void destroy(boolean waitFor)
JmeContext
destroy
in interface JmeContext
waitFor
- If true, will wait until the context is destroyed fully.public void destroy()
protected void waitFor(boolean createdVal)
public int getClientOpenGLESVersion()
public void requestDialog(int id, java.lang.String title, java.lang.String initialValue, SoftTextDialogInputListener listener)
requestDialog
in interface SoftTextDialogInput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |