OffscreenSurface

Off-screen EGL surface (pbuffer).

It's good practice to explicitly release() the surface, preferably from a "finally" block.

Constructors

Link copied to clipboard
constructor(eglCore: EglCore, width: Int, height: Int)
Creates an off-screen surface with the specified width and height.

Functions

Link copied to clipboard
open fun createOffscreenSurface(width: Int, height: Int)
Creates an off-screen surface.
Link copied to clipboard
open fun createWindowSurface(surface: Any)
Creates a window surface.
Link copied to clipboard
open fun getHeight(): Int
Returns the surface's height, in pixels.
Link copied to clipboard
open fun getWidth(): Int
Returns the surface's width, in pixels.
Link copied to clipboard
open fun makeCurrent()
Makes our EGL context and surface current.
Link copied to clipboard
open fun makeCurrentReadFrom(readSurface: EglSurfaceBase)
Makes our EGL context and surface current for drawing, using the supplied surface for reading.
Link copied to clipboard
open fun release()
Releases any resources associated with the surface.
Link copied to clipboard
Release the EGL surface.
Link copied to clipboard
open fun saveFrame(file: File)
Saves the EGL surface to a file.
Link copied to clipboard
open fun setPresentationTime(nsecs: Long)
Sends the presentation time stamp to EGL.
Link copied to clipboard
open fun swapBuffers(): Boolean
Calls eglSwapBuffers.