Skip to main content

engawa_wgpu/
lib.rs

1//! wgpu-backed `Dispatcher` impl for engawa render graphs.
2//!
3//! engawa owns the typed IR; this crate owns the wgpu wiring.
4//! Operators construct a `WgpuDispatcher` once per graph (or
5//! once per consumer lifetime), pass it the device + queue + a
6//! target format, and call `dispatch_graph` from their render
7//! loop.
8//!
9//! **Scope (v0.1):** fullscreen-effect graphs. Every node with
10//! a `Material` is dispatched as a render-pass that draws a
11//! single fullscreen triangle through a built-in vertex shader,
12//! with the operator's WGSL providing the fragment. Compute and
13//! blit passes are pending — same trait, follow-on work.
14//!
15//! **Scope (NOT v0.1):** texture allocation, swapchain
16//! management, bind-group authoring. Engawa's `ResourceBindings`
17//! is the operator-facing handoff for those — the consumer
18//! allocates / reuses wgpu textures + binds them to engawa
19//! `ResourceId`s. This crate dispatches; the consumer feeds it.
20
21#![forbid(unsafe_code)]
22#![doc(html_root_url = "https://docs.rs/engawa-wgpu/0.1.0")]
23
24mod dispatcher;
25mod pipeline;
26
27pub use dispatcher::{
28    BoundResource, BoundResources, WgpuDispatcher, WgpuDispatcherError,
29};
30pub use pipeline::{combined_shader_source, FULLSCREEN_VERTEX_WGSL};