public class EglCore
extends java.lang.Object
The EGLContext must only be attached to one thread at a time. This class is not thread-safe.
| Constructor and Description |
|---|
EglCore() |
EglCore(javax.microedition.khronos.egl.EGLConfig config) |
| Modifier and Type | Method and Description |
|---|---|
javax.microedition.khronos.egl.EGLConfig |
chooseConfig(javax.microedition.khronos.egl.EGL10 egl,
javax.microedition.khronos.egl.EGLDisplay display) |
javax.microedition.khronos.egl.EGLSurface |
createOffscreenSurface(int width,
int height)
Creates an EGL surface associated with an offscreen buffer.
|
javax.microedition.khronos.egl.EGLSurface |
createWindowSurface(java.lang.Object surface)
Creates an EGL surface associated with a Surface.
|
javax.microedition.khronos.egl.EGLConfig |
doChooseConfig(javax.microedition.khronos.egl.EGL10 egl,
javax.microedition.khronos.egl.EGLDisplay display,
javax.microedition.khronos.egl.EGLConfig[] configs) |
javax.microedition.khronos.egl.EGLSurface |
getCurrentSurface() |
javax.microedition.khronos.opengles.GL |
getGL() |
int |
getGlVersion()
Returns the GLES version this context is configured for (currently 2 or
3).
|
boolean |
isCurrent(javax.microedition.khronos.egl.EGLSurface eglSurface)
Returns true if our context and the specified surface are current.
|
void |
logCurrent(java.lang.String msg)
Writes the current display, context, and surface to the log.
|
void |
makeCurrent(javax.microedition.khronos.egl.EGLSurface eglSurface)
Makes our EGL context current, using the supplied surface for both "draw"
and "read".
|
void |
makeCurrent(javax.microedition.khronos.egl.EGLSurface drawSurface,
javax.microedition.khronos.egl.EGLSurface readSurface)
Makes our EGL context current, using the supplied "draw" and "read"
surfaces.
|
void |
makeNothingCurrent()
Makes no context current.
|
java.lang.String |
queryString(int what)
Queries a string value.
|
int |
querySurface(javax.microedition.khronos.egl.EGLSurface eglSurface,
int what)
Performs a simple surface query.
|
void |
release() |
void |
releaseSurface(javax.microedition.khronos.egl.EGLSurface eglSurface)
Destroys the specified surface.
|
void |
setPresentationTime(javax.microedition.khronos.egl.EGLSurface eglSurface,
long nsecs)
Sends the presentation time stamp to EGL.
|
boolean |
swapBuffers(javax.microedition.khronos.egl.EGLSurface eglSurface)
Calls eglSwapBuffers.
|
public EglCore()
public EglCore(javax.microedition.khronos.egl.EGLConfig config)
public javax.microedition.khronos.egl.EGLConfig chooseConfig(javax.microedition.khronos.egl.EGL10 egl,
javax.microedition.khronos.egl.EGLDisplay display)
public javax.microedition.khronos.egl.EGLConfig doChooseConfig(javax.microedition.khronos.egl.EGL10 egl,
javax.microedition.khronos.egl.EGLDisplay display,
javax.microedition.khronos.egl.EGLConfig[] configs)
public javax.microedition.khronos.opengles.GL getGL()
public void releaseSurface(javax.microedition.khronos.egl.EGLSurface eglSurface)
public javax.microedition.khronos.egl.EGLSurface createWindowSurface(java.lang.Object surface)
If this is destined for MediaCodec, the EGLConfig should have the "recordable" attribute.
public javax.microedition.khronos.egl.EGLSurface createOffscreenSurface(int width,
int height)
public void makeCurrent(javax.microedition.khronos.egl.EGLSurface eglSurface)
public void makeCurrent(javax.microedition.khronos.egl.EGLSurface drawSurface,
javax.microedition.khronos.egl.EGLSurface readSurface)
public void makeNothingCurrent()
public boolean swapBuffers(javax.microedition.khronos.egl.EGLSurface eglSurface)
public void setPresentationTime(javax.microedition.khronos.egl.EGLSurface eglSurface,
long nsecs)
public boolean isCurrent(javax.microedition.khronos.egl.EGLSurface eglSurface)
public int querySurface(javax.microedition.khronos.egl.EGLSurface eglSurface,
int what)
public java.lang.String queryString(int what)
public int getGlVersion()
public void logCurrent(java.lang.String msg)
public javax.microedition.khronos.egl.EGLSurface getCurrentSurface()
public void release()