Reintroduce support for custom primitives in iced_wgpu

This commit is contained in:
Héctor Ramón Jiménez 2024-04-08 15:04:35 +02:00
parent 6ea763c2a7
commit d922b47815
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
11 changed files with 220 additions and 173 deletions

View file

@ -1,7 +1,7 @@
use crate::core::event;
use crate::core::mouse;
use crate::core::{Rectangle, Shell};
use crate::renderer::wgpu::primitive::pipeline;
use crate::renderer::wgpu::Primitive;
use crate::shader;
/// The state and logic of a [`Shader`] widget.
@ -15,7 +15,7 @@ pub trait Program<Message> {
type State: Default + 'static;
/// The type of primitive this [`Program`] can draw.
type Primitive: pipeline::Primitive + 'static;
type Primitive: Primitive + 'static;
/// Update the internal [`State`] of the [`Program`]. This can be used to reflect state changes
/// based on mouse & other events. You can use the [`Shell`] to publish messages, request a