MacOS – Is it theoretically possible for DirectX to work on OS X natively

drivergpukernelmacos

As far as I can tell, DX as a software-component is tightly wound to Windows as for hardware-acceleration and is provided as a set of DLLs and a runtime system for applications that depend on it; however, OS X uses GPUs that support DX. The problem seems to not lie in the inability on the hardware side, but on the non-existent runtime on the software, and the inability for winding between applications and a DX runtime system.

OS X uses OpenGL only for hardware-acceleration, so if my cards are right, isn't it possible to reverse engineer DX's COM interface and re-compile it back as an Objective-C interface with static or dynamic linkage and enable the runtime to work on OS X, along with re-writing device drivers to enable mapping to GPU address space to implement the features of DirectX operations on the GPU (shading, GPGPU, etc.)? I know it sounds crazy, but I can't find any way to believe this to be impossible. Most GPUs today support DirectX.

Best Answer

It's more than theoretically possible, it's how many PC games are ported to run on OS X - using Cider from TransGaming. This is from TransGaming's web site:

Cider works by directly loading a Windows program into memory on an Intel Mac system and linking it to an optimized version of the Win32 APIs. TransGaming's Cider implements common multimedia Windows APIs such as Direct3D, DirectInput, DirectSound and many others by mapping them to Mac equivalents.