Live data from Hacker News

Direct3D to OpenGL abstraction layer

github.com

51–60 of 111 posts

Re: Direct3D to OpenGL abstraction layer

#51
post #44

Earlier quoted context omitted.

In addition with OpenGL you can access the latest features even on Windows XP. Saving you from writing separate DX9/10/11 renderpaths. But this lib is for those countless DX9 games already in existence. Valve is making SteamOS ports as easy as possible.

You still have to write an absurd amount of spaghetti code around testing GL extensions that are available. Especially when you consider the Intel IGPUs from the last 5 years - the first gen is only 2.1, second gen 3.1, and Ivy Bridge and above is 4.3. But besides those the Nvidia / AMD parts have supported 3.3 and above since 2006. Of course, if you are targeting Windows XP... you got to think back a lot further tha…

That's true if you want to support older OGL versions.

Personally I use the ES3 subset of 4.3 right now. Same code works perfectly on ES3 mobile HW and 4.3 desktop HW. The only features it lacks are geometry and tesselation shaders.

I'm also using compute shaders right now, even though they are not supported in ES3 they are going to be supported in the ES next update. And that gives me effectively everything geometry shaders etc can ever bring.

By using those I'm saved from checking any extensions. And there is not much they could even bring to the table.

Re: Direct3D to OpenGL abstraction layer

#52
post #2

kind of preaching to the choir, no? i mean, there are more open source games that use OpenGL than DirectX, and are already cross platform as a result. similarly, i would imagine if a AAA game studio wanted to do such a thing, they would roll their own (or just use GL in the first place). perhaps i'm being too cynical (but this is hacker news..)

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 holding back computing in general. and i'd never recommend anyone use AMD's Mantle for the same reason (which is a massive waste of everyone's time)

Re: Direct3D to OpenGL abstraction layer

#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.

Re: Direct3D to OpenGL abstraction layer

#54

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…

> PS3 never used OpenGL It sort of does. PS3 uses OpenGL ES 1.0 with extensions and then there is a separate graphics library, LibGCM, that is lower level. Details here (although this use says it doesn't use OpenGL and then says that its API is based on OpenGL + extensions, so it is a bit confusing): http://scalibq.wordpress.com/2010/05/15/sony%E2%80%99s-plays... EDIT: HEre is a PS3 developer saying that PS3 is OpenG…

Almost nothing uses GLES, though. All engines have libgcm renderers.

Re: Direct3D to OpenGL abstraction layer

#55
post #13

Not sure here but don't all major engines already support OpenGL ootb ? Basically any engine thats runs on PS3/PS4 does like UnrealEngine, Cryengine, idTech, Unity and most indie/open source engines are OpenGL anyway. All engines that target Android/iOS are OpenGL too. Even for things like XNA which was Xbox/DirectX only there is MonoGame to port it to *nix platforms easily. So if you have rolled your own DirectX-onl…

> 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 OpenGL it seems, but at least they are pretty close with PSGL and they also seem to be working on Linux support.

Re: Direct3D to OpenGL abstraction layer

#56

Earlier quoted context omitted.

> PS3 never used OpenGL It sort of does. PS3 uses OpenGL ES 1.0 with extensions and then there is a separate graphics library, LibGCM, that is lower level. Details here (although this use says it doesn't use OpenGL and then says that its API is based on OpenGL + extensions, so it is a bit confusing): http://scalibq.wordpress.com/2010/05/15/sony%E2%80%99s-plays... EDIT: HEre is a PS3 developer saying that PS3 is OpenG…

Almost nothing uses GLES, though. All engines have libgcm renderers.

> Almost nothing uses GLES, though. All engines have libgcm renderers.

Very true. The performance impact of both Direct3D and OpenGL is actually huge, so it is best to avoid it when you can using lower level interfaces that speak directly to the GPU.

Re: Direct3D to OpenGL abstraction layer

#57
post #50
post #38

Earlier quoted context omitted.

It was probably born out of the fact that this is the truth for PC gaming, where Microsoft uses DirectX and "all" the other platforms use OpenGL. For a long time, console game development was obscure and unaccessible (and to a large extent, this is still the case), so aspiring game developers had somewhat of a tunnel vision when it came to game platforms.

> It was probably born out of the fact that this is the truth for PC gaming, where Microsoft uses DirectX and "all" the other platforms use OpenGL. Except Acorn, Atari, Amiga, Mac OS (<= 9) never had real OpenGL support as well.

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.

Re: Direct3D to OpenGL abstraction layer

#58

For the interested, google's Angle is the opposite : https://code.google.com/p/angleproject/

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.

Re: Direct3D to OpenGL abstraction layer

#59
post #57
post #50

Earlier quoted context omitted.

> It was probably born out of the fact that this is the truth for PC gaming, where Microsoft uses DirectX and "all" the other platforms use OpenGL. Except Acorn, Atari, Amiga, Mac OS (<= 9) never had real OpenGL support as well.

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) ?

Re: Direct3D to OpenGL abstraction layer

#60
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…

PSGL is barely OpenGL, it is OpenGL ES 1.0 with Cg for shaders.

Not much that code is portable across the respective OpenGL flavors.

Post reply on HN