java.lang.Object
The EGLContext must only be attached to one thread at a time. This class is not thread-safe.
public static final int FLAG_RECORDABLE
public static final int FLAG_TRY_GLES3
Prepares EGL display and context.
Equivalent to EglCore(null, 0).
public EglCore()
Prepares EGL display and context.
public EglCore(EGLContext sharedContext,int flags)
Discards all resources held by this class, notably the EGL context. This must be called from the thread where the context was created.
On completion, no context will be current.
public void release()
protected void finalize() throws java.lang.Throwable
Destroys the specified surface. Note the EGLSurface won't actually be destroyed if it's still current in a context.
public void releaseSurface(EGLSurface eglSurface)
Creates an EGL surface associated with a Surface.
If this is destined for MediaCodec, the EGLConfig should have the "recordable" attribute.
public android.opengl.EGLSurface createWindowSurface(Object surface)
Creates an EGL surface associated with an offscreen buffer.
public android.opengl.EGLSurface createOffscreenSurface(int width,int height)
Makes our EGL context current, using the supplied surface for both "draw" and "read".
public void makeCurrent(EGLSurface eglSurface)
Makes our EGL context current, using the supplied "draw" and "read" surfaces.
public void makeCurrent(EGLSurface drawSurface,EGLSurface readSurface)
Makes no context current.
public void makeNothingCurrent()
Calls eglSwapBuffers. Use this to "publish" the current frame.
public boolean swapBuffers(EGLSurface eglSurface)
Sends the presentation time stamp to EGL. Time is expressed in nanoseconds.
public void setPresentationTime(EGLSurface eglSurface,long nsecs)
Returns true if our context and the specified surface are current.
public boolean isCurrent(EGLSurface eglSurface)
Performs a simple surface query.
public int querySurface(EGLSurface eglSurface,int what)
Queries a string value.
public java.lang.String queryString(int what)
Returns the GLES version this context is configured for (currently 2 or 3).
public int getGlVersion()
Writes the current display, context, and surface to the log.
public static void logCurrent(String msg)
From Class | Methods |
---|---|
java.lang.Object | getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |