Why is there no DirectX API for Linux?

前端 未结 6 819
伪装坚强ぢ
伪装坚强ぢ 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 03:59

    DirectX is a suit of API's:

    • Direct3D (drawing 3D graphics)
    • DirectX Graphics Infrastructure (enumerating adapters and monitors and managing swap chains)
    • Direct2D (drawing 2D graphics)
    • DirectWrite (fonts)
    • DirectCompute (GPU Computing)
    • DirectSound3D (playback of 3D sounds)
    • DirectX Media (DirectAnimation for 2D/3D web animation, DirectShow for multimedia playback and streaming media, DirectX Transform for web interactivity, and Direct3D Retained Mode for higher level 3D graphics)
    • DirectX Diagnostics (tool for diagnosing and generating reports on components related to DirectX, such as audio, video, and input drivers)
    • DirectX Media Objects (support for streaming objects such as encoders, decoders, and effects)
    • DirectSetup (installation of DirectX components, and the detection of the current DirectX version)

    DirectX components deprecated, but still supported

    • DirectDraw
    • DirectInput
    • DirectPlay
    • DirectSound
    • DirectMusic

    As you can see many parts of the DirectX suit of API's would need to be rewritten with functionality for Drivers written for Linux. Also some parts of the DirectX suit are likely going to make calls to the Windows OS and that code would have to rewritten for a Linux machine without infringement of the copy-written parts of either DirectX or the Windows OS.

    Yes you could write a open source API suit which does the same kind of thing as DirectX for Linux, however without a great knowledge of sound and graphic drivers/support by their manufactures for Linux, it would be a very hard task to do.

    However if you question was more of a "Can I get/write something to be able to run games and programs made with DirectX to run on Linux?" in it's meaning, in short no due to more likely copyright infringement.

提交回复
热议问题