
Portability benchmark of Dota2 on MacOS - kvark
http://gfx-rs.github.io/2018/08/10/dota2-macos-performance.html
======
muizelaar
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.

~~~
smaddox
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.

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

~~~
monocasa
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.

------
daniel_rh
Does this abstraction target WebGL as well? I could imagine it being a nice
portability layer for web-aware apps since rust can easily target wasm with a
few compiler flags.

~~~
grovesNL
Ideally this should be straightforward by adapting the OpenGL ES backend to
perform the equivalent WebGL calls. There have been some initial
investigations into this already, and the Emscripten target worked well with
an earlier version of gfx.

In the future there could be a backend to target WebGPU
([https://www.w3.org/community/gpu/](https://www.w3.org/community/gpu/)) as
well.

------
smaddox
Great work on the gfx portability layer! I hope to be able to use it in the
future, but for the time being I've abandoned gfx in favor of raw OpenGL calls
in order to avoid the type complexity in gfx (I spent multiple hours trying to
cram all of the gfx state into a struct, but could not figure out what to put
as some of the type signatures... even with the compiler trying to help me).
Hopefully the the low-level API, once stable, will give me the type simplicity
I prefer.

~~~
kvark
You can also try one of the Vulkan Rust libraries (ash, Vulkano). Later you'd
have easier time migrating to gfx-hal, or alternatively can just run over gfx-
portability.

~~~
smaddox
I'm currently using my MacBook pro for development, so vulkan isn't an option
right now. I'll definitely keep that in mind, though.

~~~
jrhurst
I've been doing my Vulkano learning on a mac about half of the time. MoltenVK
makes it good enough to get things going.

~~~
kvark
Well, at least now your know that there is an alternative. For a Rust
ecosystem project, really, there shouldn't be a need to use MoltenVK.

------
dogma1138
The thing that drives me insane in Dota2 on MacOS is that Quickcast doesn't
seem to work with the built-in keyboard on my mid 2015 Macbook Pro 15" :(

~~~
Benjammer
I spent about a week trying to play Dota2 on my macbook pro a couple years ago
(I've played on Windows desktop for years), and I was very put-off by the
mouse acceleration profile with my Magic Mouse. I tried tweaking it, but
couldn't get it to feel like it did with my Logitech mouse on Windows.

It wasn't about dpi or speed. I would constantly find myself trying to rapidly
aim-click on something and have my cursor stop just short of the target. The
cursor felt _heavy_ and stuck like it didn't move as easily.

~~~
jamesgeck0
MacOS mouse acceleration takes some getting used to, and there was OS-level
mouse input latency (since fixed) to contend with for a while also.

The SmoothMouse utility fixed the latency issues and made the mouse cursor
move like it did on Windows. I was very disappointed when Apple deprecated the
APIs that made it work.

