FrameBuffer
@RequiresApi(value = 26)
class FrameBuffer : AutoCloseable
Object that enables rendering into a HardwareBuffer
by creating a frame buffer object from it by leveraging Android specific EGL extensions to create an EGLImageKHR
object that is loaded as a texture.
Summary
Public constructors |
---|
FrameBuffer(egl: EGLSpec, hardwareBuffer: HardwareBuffer) |
Public functions |
|
---|---|
open Unit |
close() Closes out the frame buffer, freeing all resources within it. |
Unit |
Binds this frame buffer to the read and draw framebuffer targets if it's not closed. |
Public properties |
|
---|---|
HardwareBuffer |
the |
Boolean |
Boolean that tells if the frame buffer is currently closed |
Public constructors
FrameBuffer
FrameBuffer(egl: EGLSpec, hardwareBuffer: HardwareBuffer)
Parameters | |
---|---|
egl: EGLSpec |
|
hardwareBuffer: HardwareBuffer |
the |
Public functions
close
open fun close(): Unit
Closes out the frame buffer, freeing all resources within it. This should be done only when the frame buffer is no longer needed or being accessed.
makeCurrent
fun makeCurrent(): Unit
Binds this frame buffer to the read and draw framebuffer targets if it's not closed. If the frame buffer is already closed this method will do nothing.
Public properties
hardwareBuffer
val hardwareBuffer: HardwareBuffer
the HardwareBuffer
that this class wraps and used to generate a EGLImageKHR
object