library / com.otaliastudios.opengl.surface / EglSurface

EglSurface

abstract class EglSurface : EglNativeSurface

Common base class for EGL surfaces. There can be multiple base surfaces associated with a single EglCore object.

Constructors

<init>

EglSurface(eglCore: EglCore, eglSurface: <ERROR CLASS>)

Functions

toByteArray

Saves the EGL surface to given format. Expects that this object's EGL surface is current.

fun toByteArray(format: <ERROR CLASS> = Bitmap.CompressFormat.PNG): ByteArray

toFile

Saves the EGL surface to a file. Expects that this object's EGL surface is current.

fun toFile(file: File, format: <ERROR CLASS> = Bitmap.CompressFormat.PNG): Unit

toOutputStream

Saves the EGL surface to the given output stream. Expects that this object's EGL surface is current.

fun toOutputStream(stream: OutputStream, format: <ERROR CLASS> = Bitmap.CompressFormat.PNG): Unit

Companion Object Properties

TAG

val TAG: String

Inheritors

EglNativeWindowSurface

abstract class EglNativeWindowSurface : EglSurface

EglOffscreenSurface

A pbuffer EGL surface.

open class EglOffscreenSurface : EglSurface