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
nullptrbefore creation / after teardown. - auto MtlQueue() -> MTL::CommandQueue*
- The one command queue every frame and one-time command buffer is created from.
- auto MtlHasUnifiedMemory() -> bool
truewhen the GPU shares memory with the CPU (Apple silicon), soSharedtextures replaceManagedones- void MtlFlushFrameForReadback()
- Makes the frame's work so far visible to a readback.
-
template<class F>void MtlRunOneTimeCommands(F&& record)
- Runs
recordon a one-time command buffer and waits for it.