library / com.otaliastudios.opengl.core / EglCore

EglCore

class EglCore : EglNativeCore

Core EGL state (display, context, config). The EGLContext must only be attached to one thread at a time. This class is not thread-safe.

Parameters

sharedContext - The context to share, or null if sharing is not desired.

flags - Configuration bit flags, e.g. FLAG_RECORDABLE.

Constructors

<init>

Core EGL state (display, context, config). The EGLContext must only be attached to one thread at a time. This class is not thread-safe.

EglCore(sharedContext: <ERROR CLASS>? = EGL14.EGL_NO_CONTEXT, flags: Int = 0)

Functions

finalize

fun finalize(): Unit

makeCurrent

Makes this context current, with no read / write surfaces.

fun makeCurrent(): Unit

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.

fun release(): Unit

Companion Object Properties

FLAG_RECORDABLE

Constructor flag: surface must be recordable. This discourages EGL from using a pixel format that cannot be converted efficiently to something usable by the video encoder.

const val FLAG_RECORDABLE: Int

FLAG_TRY_GLES3

Constructor flag: ask for GLES3, fall back to GLES2 if not available. Without this flag, GLES2 is used.

const val FLAG_TRY_GLES3: Int