19 FEB 2026

rahulmnavneeth

platform behavior

homedocs

Supported Platforms

PlatformCPU BackendOpenGL BackendVulkan Backend
macOS (arm64)YesCGL offscreen contextMoltenVK
macOS (x86_64)YesCGL offscreen contextMoltenVK
Linux (x86_64)YesEGL offscreen contextNative Vulkan

Compile-Time Platform Detection

#if defined(MOP_PLATFORM_MACOS)
    /* macOS-specific code */
#elif defined(MOP_PLATFORM_LINUX)
    /* Linux-specific code */
#endif

These macros are set by the Makefile based on uname -s.

macOS Notes

Linux Notes

CPU Backend

The CPU backend has no platform dependencies. It works identically on both platforms. This makes it the reliable fallback for any environment.