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 {
|
||||
context: Arc<dyn ContextInterface>,
|
||||
_context: Arc<dyn ContextInterface>,
|
||||
|
||||
device: Arc<Device>,
|
||||
queue: Arc<Mutex<Queue>>,
|
||||
|
@ -309,7 +309,7 @@ impl GuiHandler {
|
|||
.build(device.clone())?;
|
||||
|
||||
Ok(Arc::new(GuiHandler {
|
||||
context: context.clone(),
|
||||
_context: context.clone(),
|
||||
|
||||
device: device.clone(),
|
||||
queue: queue.clone(),
|
||||
|
@ -1657,9 +1657,13 @@ impl GuiHandler {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn resize(&self, width: u32, height: u32) -> Result<()> {
|
||||
self.context
|
||||
.images()
|
||||
pub fn resize(
|
||||
&self,
|
||||
width: u32,
|
||||
height: u32,
|
||||
images: &TargetMode<Vec<Arc<Image>>>,
|
||||
) -> Result<()> {
|
||||
images
|
||||
.chain(&self.render_targets)
|
||||
.execute(|(images, render_target)| {
|
||||
let mut rt_lock = render_target.write().unwrap();
|
||||
|
|
Loading…
Reference in a new issue