@maplibre/native-ffi
    Preparing search index...

    Interface RenderSessionAttachOptions

    Options for attaching a render session to a map.

    See mln_render_session_attach_options in the C API reference.

    interface RenderSessionAttachOptions {
        driver: RenderDriverKind;
        driverWorkWake?: Wake;
        frameWake?: Wake;
        producerSyncKinds?: number;
        queueLock?: QueueLock;
        redrawWake?: Wake;
    }
    Index

    The thread that runs the session's graphics work, which depends on the target:

    • RenderDriverKind.callerGraphicsThread for a shared or dedicated EGL or WGL context, an existing WebGL context, or a browser's WebGPU device.
    • RenderDriverKind.coreWorker for 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.

    driverWorkWake?: Wake

    Called when a session driven by RenderDriverKind.callerGraphicsThread has work for RenderSessionHandle.serviceDriverWork(). It isn't called again until a service runs.

    frameWake?: Wake

    Called when frame results are waiting for RenderSessionHandle.drainFrameResults(). It isn't called again until a drain takes them.

    producerSyncKinds?: number

    The 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.

    queueLock?: QueueLock

    Your lock on the Vulkan queue, when you submit to it yourself.

    redrawWake?: Wake

    Called 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.