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."
Could this be of use to the Winelib project?
(As the name implies, it's the compile-time analogue of Wine.)
Boobs
Swapping to OpenGL provides significantly less functionality than DirectX as DirectX isn't just a graphics API.
Pretty much all aspects of DirectX except for Direct3D have been deprecated by Microsoft. They still work, but aren't recommended for new code, and have been superseded by other APIs.