Add convenience attach sampler function

This commit is contained in:
hodasemi 2025-02-28 15:08:05 +01:00
parent 7db1b64e17
commit 3d8046818f

View file

@ -344,6 +344,11 @@ impl ImageBuilder {
self self
} }
pub fn attach_pretty_sampler(self, device: &Arc<Device>) -> Result<Self> {
let lod = self.get_lod();
Ok(self.attach_sampler(Sampler::pretty_sampler(device, lod).build(device)?))
}
// pub fn mip_map_levels(mut self, levels: u32) -> Self { // pub fn mip_map_levels(mut self, levels: u32) -> Self {
// match self.builder_type { // match self.builder_type {
// ImageBuilderInternalType::NewImage(ref mut info) => { // ImageBuilderInternalType::NewImage(ref mut info) => {