Properly update displayable
This commit is contained in:
parent
a5045770ca
commit
99fad3deb3
1 changed files with 16 additions and 0 deletions
|
@ -242,6 +242,22 @@ impl Displayable {
|
|||
let width = (self.framable.right() - self.framable.left()) as f32;
|
||||
let height = (self.framable.bottom() - self.framable.top()) as f32;
|
||||
|
||||
if let DisplayableType::Descriptor(descriptor) = &*self.displayable_type.read().unwrap() {
|
||||
if width > 0.0 && height > 0.0 {
|
||||
let texture = self
|
||||
.framable
|
||||
.gui_handler()
|
||||
.displayable_image_from_descriptor(
|
||||
width as u32,
|
||||
height as u32,
|
||||
descriptor.clone(),
|
||||
)?;
|
||||
|
||||
self.descriptor_set
|
||||
.update(&[DescriptorWrite::combined_samplers(0, &[&texture])])?;
|
||||
}
|
||||
}
|
||||
|
||||
let left = x_start + width * *self.left_factor.read().unwrap();
|
||||
let right = x_start + width * *self.right_factor.read().unwrap();
|
||||
let top = y_start + height * *self.top_factor.read().unwrap();
|
||||
|
|
Loading…
Reference in a new issue