Commit graph

15 commits

Author SHA1 Message Date
Simon Hausmann
3101104f5c Switch from WGPU 24 to WGPU 25
- Use a version of FemtoVG that uses WGPU 25
- Rename the unstable-wgpu-24 feature and wgpu_24 module
- Fetch bevy from a revision on master branch that switches to WGPU 25
- Move the bevy example out of the common workspace: That way users of the repo don't get bevy pulled from git, unless they want to build the bevy example.
2025-07-09 11:30:05 +02:00
Simon Hausmann
74a62fd646 doc: Add back-links from wgpu-24 specific APIs to the slint module
cc #8631
2025-06-12 14:24:58 +02:00
Olivier Goffart
73d6095535 winit: Rename some function and add docs cross reference
CC https://github.com/slint-ui/slint/issues/8631#issuecomment-2957986384
2025-06-10 16:21:58 +02:00
Simon Hausmann
8e046a2553
backend selector: Prefer the winit backend over the default backend (… (#8402)
On Linux, if Qt is found, the qt backend is the default. This backend doesn't support selecting graphics APIs, thus
the OpenGL and WGPU examples don't run out of the box.
This patch fixes that by preferring winit.
2025-05-12 14:48:03 +02:00
Olivier Goffart
99b7b40b6f
BackendSelector: respect the SLINT_BACKEND env variable
... if the backend is not explicitly selected
2025-05-10 12:39:38 +02:00
Simon Hausmann
0002df2520
slint crate: Expose parts of the winit backend's previously private API (#8315)
Similar to the wgpu access, the `unstable-winit-030` feature exposes a
`slint::winit_030` module, which in turn re-exports `winit` but also
provides access to the `WinitWindowAccessor` trait. The
`BackendSelector` is extended to provide a way to hook into window
attribute creation as well as providing a custom event loop builder,
similar to what `i_slint_backend_winit::BackendBuilder` provides.
2025-05-02 09:21:13 +02:00
Simon Hausmann
2f2478d1ea WGPU: Clean up public API
- Create a `slint::wgpu_24` module
- Re-export `wgpu` in it
- Place the WGPU config types used by the `BackendSelector::require_wgpu_24` function in it, and remove the 24 infix.

As an upside, this also adds the feature guard to the docs at least for the `wgpu_24` module.
2025-04-30 15:54:06 +02:00
Simon Hausmann
33581182ef backend-selector: Add the ability to configure WGPU
The `require_wgpu_24` function accepts either a fully setup WGPU, or one
can configure individual aspects such as features/limits.

The wgpu_texture example uses this to add push constants to the required
features and thus eliminates the need for uniform buffers.
2025-04-29 17:46:57 +02:00
Simon Hausmann
da5e7d5b22 WGPU: Add support for using WGPU textures in Slint
This adds a `unstable-wgpu-24` feature that exposes WGPU types in the
GraphicsAPI enum, adds `require_wgpu_24()` to the backend selector,
and adds a conversion from `wgpu::Texture` to `slint::Image`.

The `require_wgpu_24()` function in the selector will be extended in the
future (before the next release) to permit specifying additional aspects
of the WGPU configuration.

Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2025-04-29 17:46:57 +02:00
Yuri Astrakhan
5356fdcf89 Fix clippy issues, plus a few manual cleanups
* Run `cargo clippy --fix`
*  `BackendSelector` is easier to instantiate with auto `Default`
2025-02-06 17:28:51 +01:00
Tasuku Suzuki
346d1c2df3 Fix typos
Ran `typos .` and fixed all typos that do make sense.
https://crates.io/crates/typos
2025-01-13 08:35:20 +01:00
Simon Hausmann
1c5c9db181 From the BackendSelector API, link to the backends and renderer chapter in the docs 2024-12-18 09:34:03 +01:00
Simon Hausmann
10413c555e doc: remove BackendSelector::doc_internal from public API 2024-12-17 10:11:58 +01:00
Simon Hausmann
9ff1d88602 Implement Drop for BackendSelector to select the backend 2024-12-16 13:06:05 +01:00
Simon Hausmann
0d36f88152 Revamp BackendSelector API
Based on API review, PlatformBuilder becomes BackendSelector with
a slightly smaller API surface but more options, such as selecting
Metal or Vulkan rendering.
2024-12-16 13:06:05 +01:00