2019-11-22 22:14:24 +01:00
|
|
|
//! A [`wgpu`] renderer for [`iced_native`].
|
|
|
|
|
//!
|
|
|
|
|
//! 
|
|
|
|
|
//!
|
|
|
|
|
//! For now, it is the default renderer of [Iced] in native platforms.
|
|
|
|
|
//!
|
|
|
|
|
//! [`wgpu`] supports most modern graphics backends: Vulkan, Metal, DX11, and
|
|
|
|
|
//! DX12 (OpenGL and WebGL are still WIP). Additionally, it will support the
|
|
|
|
|
//! incoming [WebGPU API].
|
|
|
|
|
//!
|
|
|
|
|
//! Currently, `iced_wgpu` supports the following primitives:
|
|
|
|
|
//! - Text, which is rendered using [`wgpu_glyph`]. No shaping at all.
|
|
|
|
|
//! - Quads or rectangles, with rounded borders and a solid background color.
|
|
|
|
|
//! - Clip areas, useful to implement scrollables or hide overflowing content.
|
2020-04-02 03:11:16 +02:00
|
|
|
//! - Images and SVG, loaded from memory or the file system.
|
|
|
|
|
//! - Meshes of triangles, useful to draw geometry freely.
|
2019-11-22 22:14:24 +01:00
|
|
|
//!
|
|
|
|
|
//! [Iced]: https://github.com/hecrj/iced
|
|
|
|
|
//! [`iced_native`]: https://github.com/hecrj/iced/tree/master/native
|
|
|
|
|
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
|
|
|
|
//! [WebGPU API]: https://gpuweb.github.io/gpuweb/
|
|
|
|
|
//! [`wgpu_glyph`]: https://github.com/hecrj/wgpu_glyph
|
2020-02-26 20:36:52 +01:00
|
|
|
#![deny(missing_docs)]
|
2019-11-22 22:14:24 +01:00
|
|
|
#![deny(missing_debug_implementations)]
|
|
|
|
|
#![deny(unused_results)]
|
2020-01-20 10:52:06 +01:00
|
|
|
#![forbid(unsafe_code)]
|
|
|
|
|
#![forbid(rust_2018_idioms)]
|
2020-04-04 02:14:02 +01:00
|
|
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
|
|
|
|
|
2019-12-30 12:14:26 +01:00
|
|
|
pub mod defaults;
|
2020-02-15 10:08:27 +01:00
|
|
|
pub mod settings;
|
2020-01-02 19:25:00 +01:00
|
|
|
pub mod triangle;
|
2019-12-29 10:57:01 +01:00
|
|
|
pub mod widget;
|
2020-02-09 03:25:13 +01:00
|
|
|
pub mod window;
|
2019-12-29 10:57:01 +01:00
|
|
|
|
2019-10-05 19:22:51 +02:00
|
|
|
mod primitive;
|
2019-10-07 03:56:16 +02:00
|
|
|
mod quad;
|
2019-10-05 19:22:51 +02:00
|
|
|
mod renderer;
|
2020-02-09 03:25:13 +01:00
|
|
|
mod target;
|
2019-11-13 03:54:36 +01:00
|
|
|
mod text;
|
2019-10-07 03:56:16 +02:00
|
|
|
mod transformation;
|
2020-02-09 03:25:13 +01:00
|
|
|
mod viewport;
|
2019-10-07 03:56:16 +02:00
|
|
|
|
2020-02-09 05:31:42 +01:00
|
|
|
pub use wgpu;
|
|
|
|
|
|
2019-12-30 12:14:26 +01:00
|
|
|
pub use defaults::Defaults;
|
2019-10-08 03:13:41 +02:00
|
|
|
pub use primitive::Primitive;
|
2020-02-09 03:25:13 +01:00
|
|
|
pub use renderer::Renderer;
|
2020-01-01 17:49:48 +01:00
|
|
|
pub use settings::Settings;
|
2020-02-09 03:25:13 +01:00
|
|
|
pub use target::Target;
|
|
|
|
|
pub use viewport::Viewport;
|
|
|
|
|
|
2019-12-29 10:57:01 +01:00
|
|
|
#[doc(no_inline)]
|
|
|
|
|
pub use widget::*;
|
|
|
|
|
|
|
|
|
|
pub(crate) use quad::Quad;
|
|
|
|
|
pub(crate) use transformation::Transformation;
|
2020-02-28 14:38:42 +01:00
|
|
|
|
|
|
|
|
#[cfg(any(feature = "image", feature = "svg"))]
|
|
|
|
|
mod image;
|