Valve Open Sources Their DirectX To OpenGL Layer
jones_supa writes "A bit surprisingly, Valve Software has uploaded their Direct3D to OpenGL translation layer onto GitHub as open source. It is provided as-is and with no support, under the MIT license allowing you to do pretty much anything with it. Taken directly from the DOTA2 source tree, the translation layer supports limited subset of D3D 9.0c, bytecode-level HLSL to GLSL translator, and some SM3 support. It will require some tinkering to get it to compile, and there is some hardcoded Source-specific stuff included. The project might bring some value to developers who are planning to port their product from Windows to Linux."
With a big company (in terms of money) like Valve pushing OpenGL there is a real chance DirectX will face serious and permanent competition. We will finally have a serious alternative to the suffocating model of forcing a new operating system down peoples throat through software. It worked great with the browser, now lets hope Valve can make it happen for games.
If only it was MIT-licensed so people could club together and add support for the rest of Dx9 (and 10 and 11 while they're at it)...
No colour or religion ever stopped the bullet from a gun
Could this be of use to the Winelib project?
(As the name implies, it's the compile-time analogue of Wine.)
Probably not. The wine guys tend to be more or less anti toward anything that they didn't write and thus can assert that it's not infringement on Microsoft's source code. Accepting that much code from Valve sounds very risky for them.
My guess it that they were doing a "two birds with one stone" strategy - using this project as an excuse (and test-case) for the translation layer, hoping that some devs would take this opportunity to port their DX9 games to Linux because of it, thereby improving the value of SteamOS.
Another option is that they didn't write DOTA2 from scratch, but reused an existing engine. Which in turn was based on some previous works, and at some point Direct3D was used, and remained there the whole time.
Probably not. The wine guys tend to be more or less anti toward anything that they didn't write and thus can assert that it's not infringement on Microsoft's source code. Accepting that much code from Valve sounds very risky for them.
Valve isn't some fly-by-night operation. They almost certainly have more exposure to legal liability than the Wine project would.
Hold on, The subset of DX9.0c is probably the Xbox360 native API: http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D#Gaming
This could be useful for studios looking to port Xbox360 titles to the Steam Box platform. It makes sense as there are a lot of titles that could see a sort of resurrection on Steam and bring in some more money. It is also possibly the same D3D API subset used for Windows Phone 8.