nCine/Graphics/RHI/Metal/MetalCommon.h file

Namespaces

namespace nCine
Root namespace of nCine game engine.
namespace nCine::RHI
Render Hardware Interface — compile-time-selectable graphics backend abstraction.
namespace nCine::RHI::Metal
Metal backend for macOS and iOS, selected by WITH_RHI_METAL.

Functions

auto MtlDevice() -> MTL::Device*
The device, or nullptr before creation / after teardown.
auto MtlQueue() -> MTL::CommandQueue*
The one command queue every frame and one-time command buffer is created from.
auto MtlHasUnifiedMemory() -> bool
true when the GPU shares memory with the CPU (Apple silicon), so Shared textures replace Managed ones
void MtlFlushFrameForReadback()
Makes the frame's work so far visible to a readback.
template<class F>
void MtlRunOneTimeCommands(F&& record)
Runs record on a one-time command buffer and waits for it.