use std::cell::RefCell;
use std::fmt;
use std::rc::Rc;
use wgpu::{Extent3d, TextureView};
pub type Device = Rc<wgpu::Device>;
pub type Queue = Rc<RefCell<wgpu::Queue>>;
pub type BoxedRenderPass = Box<dyn RenderPass>;
pub trait RenderPass {
fn render(&self, encoder: &mut wgpu::CommandEncoder, render_target: &TextureView);
fn update_bindings(&mut self, input_texture: &TextureView, input_texture_size: &Extent3d);
#[allow(unused_variables)]
fn resize(&mut self, encoder: &mut wgpu::CommandEncoder, width: u32, height: u32) {}
fn debug(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "dyn RenderPass")
}
}
impl fmt::Debug for dyn RenderPass + 'static {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.debug(f)
}
}