Commit Graph
12 Commits
Author SHA1 Message Date
Jay Oster dae801baa0 Replace futures with pollster
This PR removes all of the `futures` dependencies. `std::future` does not contain a lot of useful helpers available in futures. The obvious ones are `join_all`, `FutureExt::map`, and `block_on`.

* `join_all` is replaced with a `Vec<T>` and async blocks.
* `FuturesExt::map` in the web backend is replaced by rolling the `map` function into the `MakeSendFuture` type.
* `block_on` is provided by `pollster`.

The original code using `join_all` ignored the result type yielded by the Future from `map_async`. This code does the same, but makes dropping the result a little more obvious.

These should not be troublesome. Figured I would call them out anyway.

The last big change is replacing `futures-executor` in the examples with `async-executor`. A new concrete `Spawner` type is used in the example framework instead of an implementation of `futures_task::LocalSpawn`.
2021-01-07 10:10:18 -08:00
Manuel Gil a5f44f2759 Remove wgpu-subscriber -> subscriber alias in examples 2021-01-05 19:05:52 +00:00
Joshua Groves 8d5ef65dcb Temporarily use BackendBit::PRIMARY in examples
`BackendBit::all()` allows GL/surfman to be used on macOS which appears
to prevent rendering with Metal (e.g. hello-triangle displays an empty
window).

surfman will be removed in later versions of gfx, which will allow us
to switch back to `BackendBit::all()` in the examples.
2020-11-20 23:33:10 -03:30
Dzmitry Malyshau b6cabe16a2 Enable GL backend 2020-11-04 23:02:01 -05:00
Dzmitry Malyshau 503b61dc6c Update wgpu with another bind group fix, updated power preference 2020-10-13 16:57:52 -04:00
Dzmitry Malyshau ed9a2ca6df Update for the wgpu grand refactor 2020-08-13 00:26:40 -04:00
Connor Fitzgerald 7871d100c8 Convert to tracing for logging and add fmt logger 2020-07-26 00:44:39 -04:00
Connor Fitzgerald a67047297c Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
Gabriel Majeri eb91482d0b Update to new wgpu-core render pipeline API 2020-07-07 21:02:11 +03:00
Connor Fitzgerald 5529b60da4 Convert Extensions + Capabilities into Features 2020-06-26 01:27:57 -04:00
Marvin Löbel 693abce446 Move backends: BackendBit paramter to Instance::new() 2020-06-19 01:25:38 +02:00
Dzmitry Malyshau 262ac84f2c Example feature matrix 2020-06-18 13:15:41 -04:00