getContext method

VulkanDeviceContextResult getContext()

Gets the context to attach render sessions to the device with.

Pass it as the context of MapHandle.attachVulkanSurface() or MapHandle.attachVulkanBorrowedTexture(). The sessions on the device share its graphics queue. To submit to the queue yourself, set RenderSessionAttachOptions.queueLock on each session.

See mln_vulkan_device_get_context in the C API reference.

Implementation

VulkanDeviceContextResult getContext() => withNativeArena((arena) {
  final outResult = arena<raw.mln_vulkan_device_context_result>();
  outResult.ref.size = sizeOf<raw.mln_vulkan_device_context_result>();
  _check(
    raw.mln_vulkan_device_get_context(
      _handle.raw,
      outResult,
      nativeDiagnostic,
    ),
  );
  return _readVulkanDeviceContextResult(outResult.ref);
});