summaryrefslogtreecommitdiff
path: root/src/texture.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/texture.rs')
-rw-r--r--src/texture.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/texture.rs b/src/texture.rs
index a3e2c10..e0ceb7d 100644
--- a/src/texture.rs
+++ b/src/texture.rs
@@ -64,14 +64,14 @@ impl From<ImageError> for TextureError {
// TODO make this Debug
// TODO make these resizable
// TODO this could probably be moved into WgpuTextures
-pub struct TextureAtlases<'a> {
+pub struct TextureAtlas<'a> {
packer: TexturePacker<'a, image::RgbaImage, TextureId>,
image: RgbaImage,
width: u32,
height: u32,
}
-impl<'a> Default for TextureAtlases<'a> {
+impl<'a> Default for TextureAtlas<'a> {
fn default() -> Self {
Self::new(1024, 1024)
}
@@ -86,7 +86,7 @@ macro_rules! texture_info {
};
}
-impl<'a> TextureAtlases<'a> {
+impl<'a> TextureAtlas<'a> {
/// Creates a new texture atlas, with the given size
// TODO why is this u32?
pub fn new(width: u32, height: u32) -> Self {
@@ -166,7 +166,7 @@ impl<'a> TextureAtlases<'a> {
}
pub struct WgpuTextures {
- atlases: TextureAtlases<'static>,
+ atlases: TextureAtlas<'static>,
diffuse_texture: wgpu::Texture,
diffuse_bind_group: wgpu::BindGroup,
changed: bool,
@@ -187,7 +187,7 @@ macro_rules! get_info {
impl WgpuTextures {
// TODO this is still too large
pub fn new(device: &wgpu::Device, width: u32, height: u32) -> (Self, wgpu::BindGroupLayout) {
- let atlases = TextureAtlases::new(width, height);
+ let atlases = TextureAtlas::new(width, height);
let atlas_size = atlases.extent_3d();
let diffuse_texture = device.create_texture(&wgpu::TextureDescriptor {