5 ms·
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?
by dimillian 13y ago
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?
- Morgawr 13y agoWine 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.
- lucian1900 13y agoWine does provide the D3D calls and translates them to GL, which works reasonably well. It is better if the game does GL directly, which is why something the game can link in works better.
- sharpneli 13y agoIn 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.
- zanny 13y agoYou 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 than that. In some ways theres some elegance in how you can write GLES2 shader code and have it run everywhere, including on mobile, and just check extensions for everything else you use.
- sharpneli 13y agoThat'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.
- tubs 13y ago> The only features it lacks are geometry and tesselation shaders. fp64, draw_indirect, multi_draw_indirect, shader_buffer_load, bindless_texture. These are all killer features in writing fast renderers.
- maaaats 13y ago>> 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.
- gambiting 13y ago>>OpenGL is years behind D3D (not DirectX, it's not comparable!) in many areas, Explain please?
- dimillian 13y agoI 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.
- kevingadd 13y agoThe gap between GL and D3D has nothing to do with visual quality and everything to do with framerate and load times.
- maaaats 13y agoNote that I said in many areas. Not all. A history lesson of why many actually prefer the Windows stack can be read here: http://programmers.stackexchange.com/a/88055/51669 http://programmers.stackexchange.com/a/88055/51669
- outworlder 13y agoAnd you did not say which areas and why it is behind in them. I see multicore support in another comment, and maybe things related to geometry shaders. What else am I missing?
- w0rm 13y agoYeah but this does not help if you want to port older games.
- lost_name 13y agoI'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-game-developers-prefer-windows#88055 http://programmers.stackexchange.com/questions/60544/why-do-...
- jkrems 13y agoIf nothing major has changed, I'd rather use the nice API DirectX offers than the general weirdness that is OpenGL. Any project that makes DirectX (as an interface) available for all platforms is great news in my book.
- kevingadd 13y agoOpenGL drivers on Windows are still pretty far behind DirectX drivers, especially on the kind of low-spec hardware (read: Intel GPUs) average customers have. If you use OpenGL instead of Direct3D you might be paying as much as a 50% performance penalty (we certainly see about that when comparing our GL and D3D renderers for the same scenes)
- guardian5x 13y agoI 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.
- jheriko 13y agoits 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...
- jheriko 13y agofyi i meant to delete 'so that most of the loud opinions and'
- cwyers 13y agoMost of the big off-the-shelf engines (Unreal/Unity/CryTek/Source) do. If you look at first-party engines, though (Square Enix has Crystal Tools, EA has Frostbite, Monolith has LithTech, Activision has their IW engine for the CoD games), they're likely to be DirectX and console targeting. Valve is giving those kinds of engines the capability of targeting OpenGL through their existing DirectX support.
- pmelendez 13y agoNot 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.
- zanny 13y agoYou know, CPUs don't have problems using radically different architectures under one ISA (compare Pentium 2 to a core i7 or Kaveri part). The ISA evolves over time and newer instructions become more prevalent, but I never understood why graphics hardware couldn't coalesce around an extensions based ISA for hardware in general.
- outworlder 13y agoIt is true that there is a part of Wine which receives Direct3D calls and translates to OpenGL. But, as the other posters were commenting on, Wine does much more than that.
- deeviant 13y agoWine really only "works" for 2d apps.
- TazeTSchnitzel 13y agoNot true. Plenty of DirectX games work fine under Wine.