Live data from Hacker News

Direct3D to OpenGL abstraction layer

github.com

71–80 of 111 posts

Re: Direct3D to OpenGL abstraction layer

#71
post #55

Earlier quoted context omitted.

> Basically any engine thats runs on PS3/PS4 does like UnrealEngine, Cryengine, idTech, Unity and most indie/open source engines are OpenGL anyway That's completely wrong. PS3 never used OpenGL and PS4 doesn't do either. Unreal while having somewhat working Mac port is usually ported via Cedega and not the Mac version which is largely unmaintained. The Linux port of Unreal was never merged back either. Presently ther…

Quote from Wikipedia >> The current release is Unreal Engine 3, designed for Microsoft's DirectX 9 (for Windows and Xbox 360), DirectX 10 (for Windows Vista) and DirectX 11 (for Windows 7, Windows RT and later); OpenGL (for OS X, Linux, PlayStation 3, Wii U, PlayStation Vita, iOS, Android); Stage 3D (for Adobe Flash Player 11 and later); and JavaScript/WebGL (for HTML5). You are right that CryEngine doesn't use OpenG…

Wikipedia is wrong about the usage of OpenGL on consoles.

Re: Direct3D to OpenGL abstraction layer

#72
post #69

Earlier quoted context omitted.

"the advantage of a console: hardware is fixed". YEP! Why use an abstraction layer when you can just code to the metal.

Many games run on multiple consoles.

Still a pretty small number (2-8 max?) compared to all of the PC configurations you have to worry about in DX and OpenGL land.

Re: Direct3D to OpenGL abstraction layer

#73
post #52

Earlier quoted context omitted.

So far most AAA games are still developed for DirectX only. Those are the games that make or break a platform. Doom 95 was arguably the kind of killer app that established Windows as the primary gaming OS. In the context of Valve's SteamOS strategy it makes perfect sense to encourage more major developers to build games on a portable API like OpenGL or possibly AMD's Mantle by making it as easy as possible. If they f…

sorry if i wasn't clear, but i am aware that most AAA games use DX. the same is not true for open source. there are already DX->GL compatibility layers, although most of them are in house, by companies that produce ports (ala Feral Games). yes, i entirely agree with you.. almost. ideally, i'd like DirectX to.. go away, forever. proprietary APIs that result in lock in to a software or hardware platform are seriously h…

Well there are possibly smaller studios and devs who perhaps don't have the resources to roll their own translation layers, for whom this might be a tipping point towards supporting SteamOS and/or Linux.

Since Valve has already written this for their own purposes, it'll cost next to nothing for this to be published if they can stop people expecting support, and they might get a few bug reports into the bargain.

Re: Direct3D to OpenGL abstraction layer

#74
post #7

This is huge, really huge for anyone who write DirectX games and want to make them run on OSX/Linux. This is basically what a part of Wine do, am I wrong?

Wine is a bit different, I'm not 100% sure but it's more like a reimplementation of native calls than anything. But yeah, this is awesome. As a side note, developers who want to make games run on OSX and Linux should just stop targeting DirectX. This is good for already-existing games and port them over, but in 2014 if you're still writing games in DirectX, you're most likely doing it wrong.

I'm afraid I don't know exactly what comment to leave this under but it feels very relevant to this discussion. This user's answer to the question goes through quite a bit of history of Direct3D and OpenGL.

http://programmers.stackexchange.com/questions/60544/why-do-...

Re: Direct3D to OpenGL abstraction layer

#75
post #58

Earlier quoted context omitted.

Now someone needs to start a project to find a large, documented subset for which ANGLE(ToGL(x)) = x so we can all get rid of this historical two-standards-that-do-exactly-the-same-thing nonsense.

All that reminds me of is this: https://xkcd.com/927/

Yes, one must be careful not to define a new standard, but rather to observe a strict subset of both for which that "equation" holds.

Re: Direct3D to OpenGL abstraction layer

#76
post #53
post #47

Nice. Does this mean that developers can start porting their existing (pre 2013) games over to Linux? Or are we missing a DirectX to SDL translation layer?

well, SDL will do the job of getting a window from the OS. when used with GL (in the way valve do), it doesn't really do much else.

It handles sound, input and a bunch of other stuff which DirectX also handles besides window management and rendering.

Re: Direct3D to OpenGL abstraction layer

#79
post #59
post #57

Earlier quoted context omitted.

Right, but we're talking about 3D hardware APIs, which didn't really exist in a large scale until the late 90's/early 2000's.

You mean like Warp3D (Amiga) and QuickDraw3D (Apple) ?

But then add Glide (DOS), please. :-)

Re: Direct3D to OpenGL abstraction layer

#80
post #10

Earlier quoted context omitted.

>> but in 2014 if you're still writing games in DirectX, you're most likely doing it wrong. No, you are not. There is no wrong and right, it's just a stupid statement. OpenGL is years behind D3D (not DirectX, it's not comparable!) in many areas, and writing using the whole DX stack can be much nicer than setting up a GL stack with a lot of different libraries.

>>OpenGL is years behind D3D (not DirectX, it's not comparable!) in many areas, Explain please?

One of the biggest problems with OpenGL currently is the lack of a good binary intermediate representation of shaders. Direct3D has a byte code representation that is vendor neutral. OpenGL has APIs that let you cache off binary shader representations (glProgramBinary), but they are configuration specific. Configuration differences may include hardware vendor, hardware version, driver version, client OS version, etc. So in practice these formats are only useful when the shader files are compiled on the client machines. They don't actually allow developers to ship only compiled shaders unless they are comfortable with their shaders not running on future hardware, for example.

This leads to developers pursuing various less optimal solutions that all involve more startup time for users and less predictable performance and robustness for developers (at least when compared to the solution D3D has offered for more than 10 years). So when people say OpenGL is years behind D3D this is one of the things they mean. D3D isn't perfect here either. There is a fair amount of configuration-specific recompilation going on, but the formats are more compact than the optimized/minimized GLSL source formats people are pursuing on OpenGL and while the startup time (shader create time) is still too long, it is still much better than OpenGL. Shader robustness is generally more predictable and better on D3D but it's hard to disentangle shader pipeline issues from driver quality.

To be fair multicore is also an issue for OpenGL, but D3D isn't great at that either. The current spec for D3D11 includes a multicore rendering feature called "deferred contexts" but performance scaling using that feature has been disappointing so it isn't a clear win for D3D. Other APIs (e.g. hardware-specific console graphics APIs) expose more of the GPU command buffer and reducing abstraction there allows for a real solution to the multicore rendering problem. There should be a vendor neutral solution here, but so far neither of the APIs has delivered one that is close to the hardware-specific solutions in performance scaling.

Post reply on HN