Skip to content

ludus::graphics::rhi::NativeLogicalDevice

Ludus Wiki · API overview · Browse API

Class

Distinct borrowed Vulkan logical device or Metal device identity. No ownership or validation is added. Construct from the matching native object on its owner thread; a source lifetime handshake or native lease must keep that object alive during every use.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h

#include <ludus/graphics/rhi/native_interop.h>
class ludus::graphics::rhi::NativeLogicalDevice final

Methods

NativeLogicalDevice

constexpr ludus::graphics::rhi::NativeLogicalDevice::NativeLogicalDevice() noexcept=default
Construct an empty identity; no native object is borrowed.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h

NativeLogicalDevice

explicit constexpr ludus::graphics::rhi::NativeLogicalDevice::NativeLogicalDevice(void *object) noexcept
Wrap a matching live native object, or nullptr; never retain or destroy it.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h

GetObject

constexpr void * ludus::graphics::rhi::NativeLogicalDevice::GetObject() const noexcept
Return the borrowed native object for an explicit framework/backend conversion. The caller must hold its lifetime pin; nullptr denotes an empty identity.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h

IsNull

constexpr bool ludus::graphics::rhi::NativeLogicalDevice::IsNull() const noexcept
Whether this identity contains no native object; does not query device health.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h

operator==

constexpr bool ludus::graphics::rhi::NativeLogicalDevice::operator==(const NativeLogicalDevice &other) const noexcept=default
Compare native object identities only; this does not validate a lease incarnation.

Related types: NativeLogicalDevice

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/native_interop.h