wip texture managment

This commit is contained in:
griffi-gh 2023-11-23 17:59:14 +01:00
parent b17519cbc3
commit cf8263fee0
4 changed files with 17 additions and 2 deletions

7
Cargo.lock generated
View file

@ -1056,6 +1056,7 @@ dependencies = [
"kubi-logging",
"log",
"nohash-hasher",
"rect_packer",
"winit",
]
@ -1579,6 +1580,12 @@ dependencies = [
"crossbeam-utils",
]
[[package]]
name = "rect_packer"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8ffb4dfda4b01cc420847665dc480760d596ce186f2772a66ed32fe9acb1c45"
[[package]]
name = "redox_syscall"
version = "0.3.5"

View file

@ -10,6 +10,7 @@ nohash-hasher = "0.2"
glam = { version = "0.24", features = ["approx"] }
glium = { git = "https://github.com/glium/glium", rev = "968fc92378caf", optional = true }
fontdue = { version = "0.7", optional = true }
rect_packer = { version = "0.2.1", optional = true }
log = "0.4"
[dev-dependencies]
@ -18,8 +19,9 @@ glium = { git = "https://github.com/glium/glium", rev = "968fc92378caf" }
winit = "0.29"
[features]
default = ["builtin_elements", "text_rendering", "builtin_font", "backend_glium"]
default = ["builtin_elements", "texture_manager", "text_rendering", "builtin_font", "backend_glium"]
backend_glium = ["dep:glium"]
text_rendering = ["dep:fontdue"]
texture_manager = []
text_rendering = ["dep:fontdue", "texture_manager"]
builtin_font = ["text_rendering"]
builtin_elements = []

View file

@ -7,7 +7,10 @@ pub mod draw;
pub mod backend;
pub mod measure;
pub mod state;
#[cfg(feature = "text_rendering")]
pub mod font;
#[cfg(feature = "texture_manager")]
pub mod texman;
use element::UiElement;
use state::StateRepo;

3
kubi-ui/src/texman.rs Normal file
View file

@ -0,0 +1,3 @@
struct TextureSpace {
}