Refactor texture atlas
- Split into multiple modules - Rename some concepts - Change API details
This commit is contained in:
parent
82f0a49062
commit
59d45a5440
11 changed files with 647 additions and 667 deletions
17
wgpu/src/texture/atlas/layer.rs
Normal file
17
wgpu/src/texture/atlas/layer.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use crate::texture::atlas::Allocator;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Layer {
|
||||
Empty,
|
||||
Busy(Allocator),
|
||||
Full,
|
||||
}
|
||||
|
||||
impl Layer {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
match self {
|
||||
Layer::Empty => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue