News for hackers. Stuff that matters.
Re:Portability benchmark of Dota2 on MacOS by muizelaar on Friday August 10, 2018 @11:32AM (#17734231)
This is exciting because gfx-rs has implementations of Vulkan on top of Metal, D3D12, D3D11, OpenGL, and Vulkan

It brings back the option of writing one graphics backend, having it work everywhere, and as a bonus not having to deal with terrible API that is OpenGL.

Re:Portability benchmark of Dota2 on MacOS by smaddox on Friday August 10, 2018 @11:39AM (#17734308)
OpenGL is pretty bad, but it's not clear to me that Vulkan is really any better. Importantly, though, it gives more control and so makes it possible to build a good API on top.
Re:Portability benchmark of Dota2 on MacOS by monocasa on Friday August 10, 2018 @12:34PM (#17734779)
Vulkan is way better. It's not lower level per se, just a way better abstraction for how modern GPU hardware works as opposed to the mid/late 90s hardware that OpenGL still targets at it's core.

The biggest win is how explicit it is so you won't stutter for things like shader recompiles like you do in OpenGL (I'll give you a hint, most of the time the shader isn't fully compiled by the time glLink returns). Also, Vulkan's emphasis on immutable objects really tickles my fancy in terms of programming hygiene.

Re:Portability benchmark of Dota2 on MacOS by ryandrake on Friday August 10, 2018 @04:58PM (#17736687)
While Vulkan is a better abstraction for modern GPU hardware, I’ve always thought OpenGL better mapped to how humans think of 3D scenes, and imposes relatively little* tedious boilerplate on the developer. If I wanted to get a quick experiment up and running that just shows a model and maybe using a few shaders, I know which API I’d rather use. If I wanted to make a simple, non-AAA budget game without using Unity or Unreal, I know which API I’d rather use.

Vulkan, to me, is the assembly language of graphics APIs. Few should need to drop down that far, but those who do really need to.

*The exception being platform-specific window management which has always been terrible, but mostly solved by compatibility libraries.

Re:Portability benchmark of Dota2 on MacOS by monocasa on Friday August 10, 2018 @05:21PM (#17736839)
Honestly, OpenGL isn't that great for how people think. IMO a scene graph API is much better in that situation.

The boilerplate in Vulkan is a lot of work to get to a triangle on the screen, but once you're there it really isn't much more work to do whatever. The boilerplate isn't linear with lines of code, and honestly anything nontrivial with modern OpenGL is probably going to have more boilerplate.

It's sort of an unfortunate consequence of how code architecturally should change with log10(cloc). Examples in Vulkan look verbose, but as soon as you get out of examples, it's a lot nicer. So, with a simple game, I'd probably end up using something like Vulkan too.

Re:Portability benchmark of Dota2 on MacOS by pjmlp on Saturday August 11, 2018 @01:50PM (#17740718)
The world of 3D APIs would have been much different if OpenInventor was released on the same terms as OpenGL, but it wasn't.

OpenGL is so raw than everyone ends up creating their own scene graph API from scratch.

Re:Portability benchmark of Dota2 on MacOS by floatboth on Friday August 10, 2018 @11:57AM (#17734477)
More importantly, being lower-level reduces opportunities for driver bugs and inconsistencies — aren't they the main reason GL(&ES) and D3D(<12) are bad?
Re:Portability benchmark of Dota2 on MacOS by monocasa on Friday August 10, 2018 @02:53PM (#17735860)
The lower level = bad drivers argument doesn't really apply to D3D. Microsoft is in control of the high level pieces of that, and the ISVs target a low level API underneath all of that. It's been that way for decades at this point.
Re:Portability benchmark of Dota2 on MacOS by gsnedders on Friday August 10, 2018 @12:23PM (#17734709)
Note that while in principle a compiler for the lower-level APIs/languages should be simpler, these are still pretty complex compilers (and given the underlying architecture changes quite often they don't necessarily end up eventually stable, given the architecture-specific code frequently becomes unmaintained).
Re:Portability benchmark of Dota2 on MacOS by drb91 on Friday August 10, 2018 @03:52PM (#17736265)
It seems like a cleaner design to me—emphasis on a well-defined pipeline and immutable objects.
Re:Portability benchmark of Dota2 on MacOS by shawn on Friday August 10, 2018 @11:35AM (#17734256)
terrible API that is OpenGL.

Eh, Direct3D9 was awful and not at all rooted in mathematical convention. I think (0,0) was the upper left of a texture instead of the center of the upper-left texel, too.

Granted, it's been awhile. Maybe the situation has improved.

Re:Portability benchmark of Dota2 on MacOS by blattimwind on Friday August 10, 2018 @12:22PM (#17734696)
Maybe it's me not knowing any better, but for visualization stuff I've never had much problems at all with modern OpenGL.
Re:Portability benchmark of Dota2 on MacOS by foota on Friday August 10, 2018 @09:21PM (#17737780)
I think the issues start when you try and build high performance abstractions over opengl.
Re:Portability benchmark of Dota2 on MacOS by gandreani on Friday August 10, 2018 @11:41AM (#17734335)
Does it? It seems very experimental now. They even had to do work _just_ to get DOTA2 running

> The initial results were… slightly discouraging. For a while we weren’t able to get the game to start, due to our Metal backend was missing some required features, like compressed texture support

Re:Portability benchmark of Dota2 on MacOS by grovesNL on Friday August 10, 2018 @12:15PM (#17734635)
Right, at the moment there is still missing functionality on each of the backends, but Dota2 was a great test application for the gfx-rs team to prioritize implementing some of that missing functionality.

As mentioned in the blog post, the team is also actively working on improving Vulkan conformance test suite coverage, so the goal is to continue maturing these backends relatively quickly.