Live data from Hacker News

Direct3D to OpenGL abstraction layer

github.com

11–20 of 111 posts

Re: Direct3D to OpenGL abstraction layer

#11

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?

I don't see why this is so "huge". Maybe you could explain? I think developing OpenGL-Games or porting them was never a big issues. Most 3d engines today even have those abstraction layers included anyway.

Re: Direct3D to OpenGL abstraction layer

#12
post #10
post #7

Earlier quoted context omitted.

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.

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

Re: Direct3D to OpenGL abstraction layer

#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-only engine this is awesome of course, but do people really do that?

Re: Direct3D to OpenGL abstraction layer

#14
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?

I think it's not years behind, for example the latest AAA game I've played on OSX (Elder Scrolls Online) run natively on it, and it's in OpenGL. It look as good as on PC where it run with D3D.

Re: Direct3D to OpenGL abstraction layer

#15

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?

Not really, DirectX and OpenGL are abstractions to the graphic cards so you don't have to program directly on them (specially considering how they differ between vendors). If you allow me to use a very loose analogy it would be like ODBC for graphics cards.

Wine is a reimplementation of the WinAPI on Linux, so Windows applications can use the same functions in WinAPI even if they are on Linux.

Also, most AAA engines (such as Unreal Engine) already have an abstraction layer for OpenGL and DirectX so their games can run independently of which one is missing.

Re: Direct3D to OpenGL abstraction layer

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

PS3/PS4 commercial games do not use OpenGL and never have. This myth needs to die.

http://scalibq.wordpress.com/2010/05/15/sony%E2%80%99s-plays...

Re: Direct3D to OpenGL abstraction layer

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

Unreal actually implement both, so it doesn't matter which one is available they can still run.

Re: Direct3D to OpenGL abstraction layer

#18
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 fail at this, SteamOS, Steam Boxes and gaming on Linux in general won't have a chance at mainstream success.

Re: Direct3D to OpenGL abstraction layer

#19

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?

I don't see why this is so "huge". Maybe you could explain? I think developing OpenGL-Games or porting them was never a big issues. Most 3d engines today even have those abstraction layers included anyway.

its not a big deal... its just that most game code is hidden and buried so that most of the loud opinions and

i have to say its good to see this but i'm mildly disappointed too... DirectX --> OpenGL is one thing, but a properly cross platform rendering interface that will work with DX, its flavour on 360, the novelties of Win8 and Xbone as well as PS3 gcm and gx/gx2 on nintendo platforms whilst dealing with the quirks of desktop vs. es gl? that would still be a pretty run of the mill technical achievement of no particular note.

aside from that i don't like the code. singleton class instance? why not use the static keyword so the compiler knows what you want and can optimise accordingly and save you the potential to shoot yourself in the foot. and when did 2500 lines become an acceptable file size for a header? also did we forget that you can nest folders, or name files with modern 1990s style filenames...

i need to open source my stuff...

Re: Direct3D to OpenGL abstraction layer

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

PS3/PS4 commercial games do not use OpenGL and never have. This myth needs to die. http://scalibq.wordpress.com/2010/05/15/sony%E2%80%99s-plays...

yeah, the one time i tried to use psgl as a time saver it was a lesson in how broken, unmaintained and poorly documented it was...

i'm pretty sure it would have worked at some point because the docs indicated that it had. however - writing a gl like layer over the top of the rsx stuff is not a particular challenge - the functionality maps extremely well.

Post reply on HN