iced-yoda/wgpu/src/lib.rs

67 lines
1.9 KiB
Rust
Raw Normal View History

2023-07-28 19:48:39 +02:00
//! A [`wgpu`] renderer for [Iced].
2019-11-22 22:14:24 +01:00
//!
//! ![The native path of the Iced ecosystem](https://github.com/iced-rs/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/native.png?raw=true)
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
//!
//! [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
)]
#![forbid(rust_2018_idioms)]
#![deny(
missing_debug_implementations,
missing_docs,
unsafe_code,
unused_results,
rustdoc::broken_intra_doc_links
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
pub mod layer;
pub mod primitive;
pub mod settings;
pub mod window;
#[cfg(feature = "geometry")]
pub mod geometry;
2020-05-19 17:15:44 +02:00
mod backend;
mod buffer;
mod color;
2019-10-07 03:56:16 +02:00
mod quad;
mod text;
mod triangle;
2019-10-07 03:56:16 +02:00
use buffer::Buffer;
pub use iced_graphics as graphics;
pub use iced_graphics::core;
pub use wgpu;
2020-05-19 17:15:44 +02:00
pub use backend::Backend;
pub use layer::Layer;
pub use primitive::Primitive;
2020-01-01 17:49:48 +01:00
pub use settings::Settings;
#[cfg(any(feature = "image", feature = "svg"))]
mod image;
/// A [`wgpu`] graphics renderer for [`iced`].
///
/// [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
/// [`iced`]: https://github.com/iced-rs/iced
pub type Renderer = iced_graphics::Renderer<Backend>;