Skip to main content

game_toolkit_gfx/
lib.rs

1//! Graphics subsystem: wgpu init, 2D sprite batcher, primitives, text, tilemap, painter API.
2
3#![forbid(unsafe_code)]
4
5mod camera;
6mod camera3d;
7mod frame;
8mod graphics;
9mod mesh;
10mod painter;
11mod primitives;
12mod sprite;
13mod target;
14mod text;
15mod texture;
16mod tilemap;
17pub mod transform;
18#[cfg(feature = "vector")]
19mod vector;
20
21/// Re-export so downstream crates can name wgpu types (e.g. `wgpu::TextureFormat` for a
22/// depth format) without adding their own wgpu dependency or risking a version mismatch.
23pub use wgpu;
24
25/// Re-export of the vello vector renderer (feature `vector`), so callers can build a
26/// `vello::Scene` for [`Painter::vector`].
27#[cfg(feature = "vector")]
28pub use vello;
29
30pub use camera::Camera2D;
31pub use camera3d::{Camera, Camera3D};
32pub use frame::Frame;
33pub use graphics::Graphics;
34pub use mesh::{MeshId, MeshInstance, MeshVertex};
35pub use painter::Painter;
36pub use primitives::CircleInstance;
37pub use sprite::{BlendMode, SpriteInstance};
38pub use texture::{Texture, TextureId};
39pub use tilemap::Tilemap;
40pub use transform::Mat4;