release

open fun release(doEglCleanup: Boolean)

Releases resources.

This must be called with the appropriate EGL context current (i.e. the one that was current when the constructor was called). If we're about to destroy the EGL context, there's no value in having the caller make it current just to do this cleanup, so you can pass a flag that will tell this function to skip any EGL-context-specific cleanup.