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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Texture management for Dear ImGui
//!
//! This module provides access to Dear ImGui's modern texture management system introduced in
//! version 1.92+. [`OwnedTextureData::from_pixels`] creates a complete CPU texture, while
//! [`TextureData::replace_pixels`] and [`TextureData::update_subresource`] perform transactional
//! mutations.
//!
//! [`TextureRegion`] is the `u32` input rectangle for a requested update. [`TextureSubresource`]
//! pairs that region with an explicit source row pitch and payload. [`TextureRect`] is the narrower
//! `u16` snapshot of rectangles already accepted by Dear ImGui's native update queue; it is not an
//! input builder.
//!
//! ```
//! use dear_imgui_rs::texture::{
//! OwnedTextureData, TextureFormat, TextureRegion, TextureSubresource,
//! };
//!
//! let mut texture =
//! OwnedTextureData::from_pixels(TextureFormat::Alpha8, 4, 2, &[0; 8])?;
//! let region = TextureRegion::new(1, 0, 2, 2)?;
//! texture.update_subresource(TextureSubresource::new(
//! region,
//! 3,
//! &[1, 2, 99, 3, 4],
//! ))?;
//! # Ok::<(), dear_imgui_rs::TextureDataError>(())
//! ```
pub use TextureData;
pub use ;
pub use ;
pub use ;
pub use ;
pub use OwnedTextureData;
pub use TextureRect;
pub use TextureRef;
pub use ;
pub use ;
pub use ;