Why is there no DirectX API for Linux?

Brian picture Brian · Jun 20, 2012 · Viewed 27.5k times · Source

Upon considering the driver side implementation for DirectX API on windows systems for modern video cards I was wondering why this implementation is not available on non-windows system, most notably linux.

Since there is an obvious absence of this functionality I can only assume there is a good reason which I am blind to, but in my primitive understanding I simply see the DirectX calls as no more than function entry points on the hardware device. And for the record I am not referring to a compatibility layer (most notably WINE, a project I am amazed by every single day) but a library making direct hardware calls.

Is it possible to create an open source version of directx? Would it be possible but obscenely difficult?

Answer

Zang MingJie picture Zang MingJie · Jun 20, 2012

AFAIK, the DirectX contains 3 parts

  • Vendor driver (provide low level API defined by DX)
  • DirectX library (use low level API defined by DX to access hardware, provide DirectX API)
  • Software (use DirectX API, ex. game)

There are no driver providing the low level API defined by DX on linux, so even it is possible to provide the DirectX library, but it won't work without proper vendor driver, and I can't see if there is any vendor is going to create one for their hardware platform.