setOpenGlSurfaceTarget method
- OpenGlSurfaceReplacement replacement
Replaces the OpenGL surface that the session presents to.
Use it to give the session a surface again after
RenderSessionHandle.releaseTarget(), to move it to another surface, or
to resize it. Once the replacement completes, the session no longer uses
the old surface.
See mln_render_session_set_open_gl_surface_target in the
C API reference.
Implementation
Future<void> setOpenGlSurfaceTarget(OpenGlSurfaceReplacement replacement) =>
_run(
(arena, completion) =>
raw.mln_render_session_set_open_gl_surface_target(
_handle.raw,
_writeOpenGlSurfaceReplacement(replacement, arena),
completion,
nativeDiagnostic,
),
);