public class EglCore implements GLReleasable
Core EGL state (display, context, config).
The EGLContext must only be attached to one thread at a time. This class is not thread-safe.
Modifier and Type | Class and Description |
---|---|
static class |
EglCore.Companion |
Modifier and Type | Field and Description |
---|---|
static EglCore.Companion |
Companion |
Constructor and Description |
---|
EglCore(android.opengl.EGLContext sharedContext)
Core EGL state (display, context, config).
|
EglCore()
Core EGL state (display, context, config).
|
Modifier and Type | Method and Description |
---|---|
android.opengl.EGLSurface |
createOffscreenSurface(int width,
int height)
Creates an EGL surface associated with an offscreen buffer.
|
boolean |
makeCurrent(android.opengl.EGLSurface eglSurface)
Makes our EGL context current, using the supplied surface for both "draw" and "read".
|
void |
release()
Discards all resources held by this class, notably the EGL context. This must be
called from the thread where the context was created.
|
void |
releaseSurface(android.opengl.EGLSurface eglSurface)
Destroys the specified surface. Note the EGLSurface won't actually be destroyed if it's
still current in a context.
|
release
public static EglCore.Companion Companion
public EglCore(android.opengl.EGLContext sharedContext)
Core EGL state (display, context, config).
The EGLContext must only be attached to one thread at a time. This class is not thread-safe.
public EglCore()
Core EGL state (display, context, config).
The EGLContext must only be attached to one thread at a time. This class is not thread-safe.
public void release()
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 releaseSurface(android.opengl.EGLSurface eglSurface)
Destroys the specified surface. Note the EGLSurface won't actually be destroyed if it's still current in a context.
public android.opengl.EGLSurface createOffscreenSurface(int width, int height)
Creates an EGL surface associated with an offscreen buffer.
public boolean makeCurrent(android.opengl.EGLSurface eglSurface)
Makes our EGL context current, using the supplied surface for both "draw" and "read".