2023-07-28 19:48:39 +02:00
//! A [`wgpu`] renderer for [Iced].
2019-11-22 22:14:24 +01:00
//!
2021-12-23 09:34:37 +02:00
//! 
2019-11-22 22:14:24 +01:00
//!
//! [`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:
2023-07-28 19:48:39 +02:00
//! - Text, which is rendered using [`glyphon`].
2019-11-22 22:14:24 +01:00
//! - 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
//!
2021-12-23 09:34:37 +02:00
//! [Iced]: https://github.com/iced-rs/iced
2019-11-22 22:14:24 +01:00
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
//! [WebGPU API]: https://gpuweb.github.io/gpuweb/
2023-07-28 19:48:39 +02:00
//! [`glyphon`]: https://github.com/grovesNL/glyphon
2021-12-08 08:04:46 +01:00
#![ doc(
2021-12-09 15:10:38 +07:00
html_logo_url = " https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg "
2021-12-08 08:04:46 +01:00
) ]
2023-09-09 20:58:45 +02:00
#![ forbid(rust_2018_idioms) ]
2022-07-09 18:03:59 +02:00
#![ deny(
2023-06-29 07:55:52 +02:00
missing_debug_implementations ,
2023-08-30 04:31:21 +02:00
//missing_docs,
2022-07-09 18:03:59 +02:00
unsafe_code ,
unused_results ,
clippy ::extra_unused_lifetimes ,
clippy ::from_over_into ,
clippy ::needless_borrow ,
clippy ::new_without_default ,
2023-09-09 20:58:45 +02:00
clippy ::useless_conversion ,
rustdoc ::broken_intra_doc_links
2022-07-09 18:03:59 +02:00
) ]
#![ allow(clippy::inherent_to_string, clippy::type_complexity) ]
2023-05-11 17:28:51 +02:00
#![ cfg_attr(docsrs, feature(doc_auto_cfg)) ]
2023-03-01 21:34:26 +01:00
pub mod layer ;
2023-06-29 07:48:03 +02:00
pub mod primitive ;
2020-02-15 10:08:27 +01:00
pub mod settings ;
2020-02-09 03:25:13 +01:00
pub mod window ;
2019-12-29 10:57:01 +01:00
2023-03-03 04:57:55 +01:00
#[ cfg(feature = " geometry " ) ]
pub mod geometry ;
2023-03-03 04:00:44 +01:00
2020-05-19 17:15:44 +02:00
mod backend ;
2022-11-03 05:00:35 +01:00
mod buffer ;
2023-06-27 20:26:13 +02:00
mod color ;
2019-10-07 03:56:16 +02:00
mod quad ;
2019-11-13 03:54:36 +01:00
mod text ;
2022-11-14 00:02:42 +01:00
mod triangle ;
2019-10-07 03:56:16 +02:00
2023-05-19 04:02:18 +02:00
use buffer ::Buffer ;
2023-03-04 05:37:11 +01:00
pub use iced_graphics as graphics ;
pub use iced_graphics ::core ;
2023-03-01 21:34:26 +01:00
2020-02-09 05:31:42 +01:00
pub use wgpu ;
2020-05-19 17:15:44 +02:00
pub use backend ::Backend ;
2023-03-01 21:34:26 +01:00
pub use layer ::Layer ;
2023-06-22 00:38:36 +02:00
pub use primitive ::Primitive ;
2020-01-01 17:49:48 +01:00
pub use settings ::Settings ;
2020-02-09 03:25:13 +01:00
2022-11-05 03:26:19 +01:00
#[ cfg(any(feature = " image " , feature = " svg " )) ]
2020-02-28 14:38:42 +01:00
mod image ;
2020-05-28 01:37:59 +02:00
/// A [`wgpu`] graphics renderer for [`iced`].
///
/// [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
2021-12-23 09:34:37 +02:00
/// [`iced`]: https://github.com/iced-rs/iced
2023-03-04 05:37:11 +01:00
pub type Renderer < Theme > = iced_graphics ::Renderer < Backend , Theme > ;