tirbofish/dropbear · commit
aa5d3a33e6536dd92db9cbd864b25709f078faba
fix: bug with padding of MaterialUniform
Signature present but could not be verified.
Unverified
@@ -1,6 +1,6 @@ use crate::graphics::SharedGraphicsContext; use crate::model::Model; -use crate::texture::Texture; +use crate::texture::{Texture, TextureBuilder}; use crate::utils::ResourceReference; use parking_lot::RwLock; use std::collections::HashMap; @@ -219,15 +219,12 @@ impl AssetRegistry { return handle; } - let texture = Texture::from_bytes_verbose_mipmapped_with_format( - graphics, - &rgba, - Some((1, 1)), - None, - None, - format, - Some(label.as_str()), - ); + let texture = TextureBuilder::new(&graphics.device) + .with_raw_pixels(graphics.clone(), &rgba) + .size(1, 1) + .format(format) + .label(label.as_str()) + .build(); self.add_texture_with_label(label, texture) } @@ -1,8 +1,9 @@ use crate::asset::{AssetRegistry, Handle}; use crate::buffer::UniformBuffer; +use crate::texture::TextureBuilder; use crate::{ graphics::SharedGraphicsContext, - texture::{Texture, TextureBuilder, TextureWrapMode}, + texture::{Texture, TextureWrapMode}, utils::ResourceReference, }; use gltf::image::{Format, Source}; @@ -160,89 +161,81 @@ pub enum ChannelValues {
Large diffs are not rendered by default. Showing the first 50 of 1102 lines. Show full diff