ludus::graphics::rhi::NativeDeviceLifetime¶
Ludus Wiki · API overview · Browse API
Struct
Source-owner handshake for admitting an existing native device. Callbacks run on the device owner thread and must not reenter RHI. They never transfer native device destruction to RHI. The source must retain the context until Release.
Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h
#include <ludus/graphics/rhi/native_interop.h>
struct ludus::graphics::rhi::NativeDeviceLifetime final
Fields¶
Context¶
void* ludus::graphics::rhi::NativeDeviceLifetime::Context = nullptr
Source owner, valid through the balanced Release callback.
Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h
Retain¶
bool(*) ludus::graphics::rhi::NativeDeviceLifetime::Retain(void *) noexcept(void *) noexcept = nullptr
Retain the source context; false rejects admission without calling Release.
Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h
Release¶
void(*) ludus::graphics::rhi::NativeDeviceLifetime::Release(void *) noexcept(void *) noexcept = nullptr
Called exactly once after each successful Retain, following native cleanup.
Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h