library / com.otaliastudios.opengl.core / EglCore

EglCore

class 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.

Parameters

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

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

Constructors

<init>

EglCore(sharedContext: EGLContext = EGL14.EGL_NO_CONTEXT, flags: Int = 0)

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

Functions

finalize

fun finalize(): Unit

queryString

fun queryString(what: Int): String

Queries a string value.

release

fun release(): Unit

Discards all resources held by this class, notably the EGL context. This must be called from the thread where the context was created.

Companion Object Properties

FLAG_RECORDABLE

const val FLAG_RECORDABLE: Int

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.

FLAG_TRY_GLES3

const val FLAG_TRY_GLES3: Int

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