pub struct RenderSessionAttachOptions {
pub driver: RenderDriverKind,
pub producer_sync_kinds: GpuSyncKindFlag,
pub frame_wake: Wake,
pub redraw_wake: Wake,
pub driver_work_wake: Wake,
pub queue_lock: QueueLock,
}Expand description
Options for attaching a render session to a map.
See mln_render_session_attach_options in the
C API reference.
Fields§
§driver: RenderDriverKindThe thread that runs the session’s graphics work, which depends on the target:
RenderDriverKind::CallerGraphicsThreadfor a shared or dedicated EGL or WGL context, an existing WebGL context, or a browser’s WebGPU device.RenderDriverKind::CoreWorkerfor a transferred WebGL canvas, an Android, OpenHarmony, or Win32 window, a Wayland surface, a ring of Android hardware buffers, dmabufs, DXGI shared textures, or IOSurfaces, or an offscreen session.- Either one for another Metal or Vulkan target.
An attach with another driver fails with Status::Unsupported.
producer_sync_kinds: GpuSyncKindFlagThe kinds of GpuSync that you can wait on before you read an acquired
frame. The session uses one of them that its target supports. Zero lets
the session pick a kind that names no object to wait on.
frame_wake: WakeCalled when frame results are waiting for
RenderSessionHandle::drain_frame_results(). It isn’t called again
until a drain takes them.
redraw_wake: WakeCalled when the session has something new to draw. Demand a frame at your next display refresh. It isn’t called again until you demand a frame, or while the session has no target.
driver_work_wake: WakeCalled when a session driven by RenderDriverKind::CallerGraphicsThread
has work for RenderSessionHandle::service_driver_work(). It isn’t
called again until a service runs.
queue_lock: QueueLockYour lock on the Vulkan queue, when you submit to it yourself.
Implementations§
Source§impl RenderSessionAttachOptions
impl RenderSessionAttachOptions
pub fn new(driver: RenderDriverKind) -> Self
Trait Implementations§
Source§impl Clone for RenderSessionAttachOptions
impl Clone for RenderSessionAttachOptions
Source§fn clone(&self) -> RenderSessionAttachOptions
fn clone(&self) -> RenderSessionAttachOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RenderSessionAttachOptions
impl !UnwindSafe for RenderSessionAttachOptions
impl Freeze for RenderSessionAttachOptions
impl Send for RenderSessionAttachOptions
impl Sync for RenderSessionAttachOptions
impl Unpin for RenderSessionAttachOptions
impl UnsafeUnpin for RenderSessionAttachOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more