Rework resize
This commit is contained in:
parent
304a29397b
commit
be69061dd9
1 changed files with 9 additions and 5 deletions
|
@ -191,7 +191,7 @@ impl TextToScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct GuiHandler {
|
pub struct GuiHandler {
|
||||||
context: Arc<dyn ContextInterface>,
|
_context: Arc<dyn ContextInterface>,
|
||||||
|
|
||||||
device: Arc<Device>,
|
device: Arc<Device>,
|
||||||
queue: Arc<Mutex<Queue>>,
|
queue: Arc<Mutex<Queue>>,
|
||||||
|
@ -309,7 +309,7 @@ impl GuiHandler {
|
||||||
.build(device.clone())?;
|
.build(device.clone())?;
|
||||||
|
|
||||||
Ok(Arc::new(GuiHandler {
|
Ok(Arc::new(GuiHandler {
|
||||||
context: context.clone(),
|
_context: context.clone(),
|
||||||
|
|
||||||
device: device.clone(),
|
device: device.clone(),
|
||||||
queue: queue.clone(),
|
queue: queue.clone(),
|
||||||
|
@ -1657,9 +1657,13 @@ impl GuiHandler {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn resize(&self, width: u32, height: u32) -> Result<()> {
|
pub fn resize(
|
||||||
self.context
|
&self,
|
||||||
.images()
|
width: u32,
|
||||||
|
height: u32,
|
||||||
|
images: &TargetMode<Vec<Arc<Image>>>,
|
||||||
|
) -> Result<()> {
|
||||||
|
images
|
||||||
.chain(&self.render_targets)
|
.chain(&self.render_targets)
|
||||||
.execute(|(images, render_target)| {
|
.execute(|(images, render_target)| {
|
||||||
let mut rt_lock = render_target.write().unwrap();
|
let mut rt_lock = render_target.write().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue