How and how hard would it be to create DirectX vendor drivers for Linux? [closed]

StackOverflow https://stackoverflow.com/questions/15602708

  •  29-03-2022
  •  | 
  •  

سؤال

As seen on this thread, it seems that the missing part to be able to run DirectX on Linux natively are vendor drivers.

What exactly are vendor driver? Are they drivers interfacing a specific model of a component, or a family, or even any of them? What are they coded in? ASM and C most likely?

How would someone (or a team) create these drivers for Linux? How would it be integrated into Linux? Would the games or applications in general made for Windows and using DirectX need any tweak for Linux? Would companies making games build their games for Linux knowing they can be used without or with only a few tweaks needed?

How hard would it be to make these drivers? How long would it take? Would it require any specific knowledge?

I know this makes a lot of questions, but I'm very curious about that and why no big groups have ever worked on that seriously (even though there must be a good reason).

Thank you a lot in advance for your answers!

EDIT: This is by no means an incitation to a debate of, for example, OpenGL vs DirectX, or Windows vs Linux. By reading the FAQ, I can't really see why this thread isn't constructive as it asks for pretty well-aimed questions which should be answerable quickly.

هل كانت مفيدة؟

المحلول

IMHO the main reason no one really bothers into dealing with directX is based on the fact that there already is a graphics library (mesa in the special case of Linux) available that fully supports any desired graphics operation also available with DirectX.

In contrast to following DirectX, which is a specification based on so called intellectual property owned by a single corparation the API used by this library called openGL is an open standard agreed upon by a consortium of hardware manufacturers.

Different from the philosophy of constraining it's use to just one operating system possibly trying to shackle its users to the one and only platform openGL was intended as a platform independent API right from the beginning.

Following this principle in contrast to DirectX being available just on one single platform openGL is available on any computing platform ranging from android based systems, Mac and numerous other UNIXoid systems including Linux even to Windows machines.

Using any other API than openGL would break this platform independence, which probably wouldn't be received as a progress but rather as a regression.

To sum it up possibly the main reasons to favor openGL over DirectX are the following:

  • openGL is an open standard while DirectX is proprietary

  • openGL is available on any platform DirectX is only available on a single platform

  • any operation supported by DirectX is supported by openGL as well

  • if they are really needed DirectX calls can be provided by a wrapper library pushing operations down to openGL as for example done in WINE

Mere availablity of a DirectX library implementation alone wouldn't enable any binary code designed for the Windows platform to run at all as the whole set of system libraries and infrastructure still would not be available at all. As a matter of fact even the binary format in use PE/COFF on Windows ELF on Linux is different.

An effort to supply a whole compatibility layer including needed system libraries is already on the way. As already mentioned above it goes by the name of WINE. (see: http://www.winehq.org/)

I hope I gave you some good reasons why no one ever tried (or will try) as you requested.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top