Why is there no DirectX API for Linux?

前端 未结 6 822
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 03:27

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

6条回答
  •  余生分开走
    2021-02-04 04:01

    Why not just use OpenGL? It supports all the functionality that DirectX does. Do you have a specific reason to use DirectX? As for a reason, Microsoft made DirectX and I guess they didn't see any need to allow it to run on Linux.

    You can run DirectX games in Linux using Wine. You can program XNA on Linux using MonoGame. But all of these use OpenGL to provide hardware-accelerated rendering. AFAIK, OpenGL has been (and probably will be) the only option on Linux for the foreseeable future.

    Is it possible to write your own DirectX implementation? Sure - but it involves writing drivers, proprietary knowledge and probably too much cost for anyone to REALLY benefit from it.

    EDIT: These days, DXVK is a very real and performant way to run DirectX applications on Linux.

提交回复
热议问题