I'm wondering, why does ZDoom use Direct3D for it's 2D Displays, when OpenGL would have been a better choice for cross-platform compatibility? (OpenGL is capable of Accelerated 2D Rendering, as far as I'm aware despite being a primarily 3D Graphics Library.)
The features that come from the current implementation are not exactly trivial, they allow true-color fonts, hud displays, and weapons, and probably a lot of other things I'm forgetting. (Isn't the Stencil Renderstyle based on this?) But, other platforms, such as Linux cannot take advantage of this and are forced to go back to the old way of rendering hud elements, and looks like trash on WADs that take advantage of the feature. Ie: Palette rape, PNG Alpha being destroyed, etc.
Also, doesn't having to rely on the different systems (ie. Direct3D, the DDraw fallback, and whatever Linux Uses), instead of one, make things more difficult to maintain? I could be wrong, I'm not exactly sure how all that stuff works, I'm just curious though, and hope to get an answer from someone who may know more.
If all this has already been answered, please link me.
Why Direct3D?
- StrikerMan780
- Posts: 486
- Joined: Tue Nov 29, 2005 2:15 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
-
-
- Posts: 3213
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: Why Direct3D?
I can't say exactly why Randy chose D3D over OpenGL (if I had to guess, he probably had previous experience with D3D), but in general I know he likes to be as native as possible.
It would be ideal to at some point get OS X off of SDL and using Cocoa natively. For Linux SDL is basically native. Sure it could interface with X directly, but with Mir and Wayland around the corner, that would be a horrible idea.
It is indeed more work to maintain multiple backends. However, system interfacing is an area where using a one size fits all solution almost always has a draw back. For example, the SDL backend that's used on Linux and OS X would indeed work on Windows. In fact, ECWolf uses it on Windows right now. But SDL's default backend doesn't work with fraps and is slower, and their deprecated DirectX backend has freezing issues (note I haven't compared 2.0). There's also a minor palette corruption issue at times. So it's more work, but the user experience can be way better going that way.StrikerMan780 wrote:Also, doesn't having to rely on the different systems (ie. Direct3D, the DDraw fallback, and whatever Linux Uses), instead of one, make things more difficult to maintain? I could be wrong, I'm not exactly sure how all that stuff works, I'm just curious though, and hope to get an answer from someone who may know more.
It would be ideal to at some point get OS X off of SDL and using Cocoa natively. For Linux SDL is basically native. Sure it could interface with X directly, but with Mir and Wayland around the corner, that would be a horrible idea.