Want more features and no adverts?
Subscribe to GOL Premium
Valve Has Posted Their Direct3D To OpenGL Translation Layer Onto Github
Posted , 11 March 2014 at 10:53 am UTC / 22628 views
Well this was a surprising move, Valve creators of Steam have posted their Direct3D to OpenGL translation layer onto github.

Features
  • Limited subset of Direct3D 9.0c
  • Bytecode-level HLSL -> GLSL translator
  • Some SM3 support: Multiple Render Targets, no Vertex Texture Fetch

It is provided as-is and with no support, it may be useful for projects like Wine and for other developers looking to make the porting job easier.

They have left in some hardcoded Source Engine stuff as it was literally ripped out from DOTA2.

Find it on github here.

I do wonder if many people will take advantage of it, imagine how big a project this could be if a few developers pick it up and work on it removing things like hardcoded Source Engine behaviour, more documentation etc. It could enable some bigger AAA games to get ported to Linux faster (or give them more of an incentive to try), but that's just my wishful thinking.

I am the owner of GamingOnLinux. A fan of anything techy, and not just Linux stuff.

You can follow my personal blog here.

Bart commented on 11 March 2014 at 12:42 pm UTC

Surely this is a good thing. Valve wants SteamOS support and this can enable some developers a shorter path to achieve it.

Surely this is a good thing. Valve wants SteamOS support and this can enable some developers a shorter path to achieve it.
0 Likes
aaaaaaaa commented on 11 March 2014 at 1:16 pm UTC

as far as i remember wine uses their own WGL layer, not classic OpenGL. this kinda makes me wonder if there could be anything beside reference implementations of some methods and maybe shader converter, since shaders were always piss poor on wine.

but, living as its own project i could see a lot of worth if it people would start on improving it. painless porting would be the 1st result

as far as i remember wine uses their own WGL layer, not classic OpenGL. this kinda makes me wonder if there could be anything beside reference implementations of some methods and maybe shader converter, since shaders were always piss poor on wine. but, living as its own project i could see a lot of worth if it people would start on improving it. painless porting would be the 1st result
0 Likes
Speedster commented on 11 March 2014 at 9:27 pm UTC
  • GOL Supporter

Ok this is the sort of present that those who grumbled about gifting of non-free games to debian/ubuntu devs should be impressed with! Way to go Valve!

Ok this is the sort of present that those who grumbled about gifting of non-free games to debian/ubuntu devs should be impressed with! Way to go Valve!
0 Likes
s_d commented on 11 March 2014 at 11:22 pm UTC
  • GOL Supporter

Yes, bravo!

Also, Valve appear to have released it using their own variant of a 2-clause BSD-style license.

Yes, bravo! :D Also, Valve appear to have released it using [url=https://github.com/ValveSoftware/ToGL/blob/master/LICENSE]their own variant of a 2-clause BSD-style license[/url].
0 Likes
TPLAR commented on 24 March 2014 at 9:12 am UTC

I wished if AMD released her Mantle for linux then the whole story would change but unfortunately ...
but still good to c such a thing.

I wished if AMD released her Mantle for linux then the whole story would change but unfortunately ... but still good to c such a thing.^_^
0 Likes
c704710 commented on 3 July 2014 at 6:32 pm UTC

My knowledge of compilers is little more than 4 bytes. But I'm thinking if I've improperly applied all the wrong knowledge in the worst possible way I've got an inkling of exactly how TOGL works.

A developer has source code with a subset of Direct3D 9.0c compliant calls in it (hopefully no D3D9c calls that TOGL wouldn't recognize)
They run togl on it, which converts all the Direct3D 9.0c compliant calls into bytecode 3D calls
bytecode being a step higher than Assembly language in human readability yet slightly more difficult to understand and being directly compiler readable (unlike an actual high level language which must be parsed and other steps taken for the compiler to comprehend it)
However, its not the bytecode 3D calls that a compiler would come up with on its own, which is a normal part of the compiling process most developers will never have any need to see, if compiler were told to compile Direct3D 9.0c compliant calls. Since those calls would be derived from d3d9.dll and other such libraries. RATHER, TOGL creates bytecode 3D calls derived from opengl.dll or opengl.so depending on the host and target platforms.
So was that mangle badly enough?

Really, how exactly does it work?

My knowledge of compilers is little more than 4 bytes. But I'm thinking if I've improperly applied all the wrong knowledge in the worst possible way I've got an inkling of exactly how TOGL works. A developer has source code with a subset of Direct3D 9.0c compliant calls in it (hopefully no D3D9c calls that TOGL wouldn't recognize) They run togl on it, which converts all the Direct3D 9.0c compliant calls into bytecode 3D calls bytecode being a step higher than Assembly language in human readability yet slightly more difficult to understand and being directly compiler readable (unlike an actual high level language which must be parsed and other steps taken for the compiler to comprehend it) However, its not the bytecode 3D calls that a compiler would come up with on its own, which is a normal part of the compiling process most developers will never have any need to see, if compiler were told to compile Direct3D 9.0c compliant calls. Since those calls would be derived from d3d9.dll and other such libraries. RATHER, TOGL creates bytecode 3D calls derived from opengl.dll or opengl.so depending on the host and target platforms. So was that mangle badly enough? Really, how exactly does it work?
0 Likes

Due to spam you need to Register and Login to comment.


Or login with...

Sales Tracker
Humble Store
Bridge Constructor Medieval
Humble Store
Shadowrun Returns
Humble Store
Proteus
Humble Store
Space Hulk
See all
Popular this week
View by Category
Contact
Twitter
Latest Comments
Latest Forum Posts
Facebook
Who's Online
There are 356 in total online.
Users online: gbudny, KimmoKM, omer666, sobkas, StianTheDark,
Misc