1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Main WGPU renderer implementation
//!
//! This module contains the main WgpuRenderer struct and its implementation,
//! following the pattern from imgui_impl_wgpu.cpp
//!
//! Texture Updates Flow (ImGui 1.92+)
//! - During `Context::render()`, Dear ImGui emits a list of textures to be processed with
//! `DrawData::textures_mut()` (see `dear_imgui_rs::render::DrawData::textures_mut`). Each item is
//! an `ImTextureData*` with a `Status` field:
//! - `WantCreate`: create a GPU texture, upload all pixels, set `TexID`, then set status `OK`.
//! - `WantUpdates`: upload `UpdateRect` (and any queued rects) then set `OK`.
//! - `WantDestroy`: schedule/destroy GPU texture; if unused for some frames, set `Destroyed`.
//! - This backend honors these transitions in its texture module; users can simply pass
//! `&mut TextureData` to UI/draw calls and let the backend handle the rest.
use crate::;
pub use WgpuRenderer;
use ;