pub fn draw_debug_window(
        &mut self,
        delta: f32,
        frame: &mut Frame,
        pipelines: &mut DefaultPipelines,
        model: &Model,
        camera: Handle<Node>,
    ) {
        self.update(delta, &mut frame.res, |ui| {
            im::Window::new(im::im_str!("Debug"))
                .no_decoration()
                .always_auto_resize(true)
                .save_settings(false)
                .focus_on_appearing(false)
                .no_nav()
                .position([16.0, 16.0], im::Condition::Always)
                .bg_alpha(0.33)
                .build(ui, || {
                    // Pipeline
                    let mut current = if pipelines.debug.is_none() {
                        0
                    } else {
                        pipelines.debug.unwrap() as usize
                    };
                    ui.text("Pipeline:");

                    let items = [
                        im::im_str!("None"),
                        im::im_str!("Albedo"),
                        im::im_str!("Normal"),
                    ];
                    ui.text(" · ");
                    ui.same_line(0.0);
                    if im::ComboBox::new(im::im_str!("")).build_simple(
                        &ui,
                        &mut current,
                        &items,
                        &|&s| s.into(),
                    ) {
                        if current == 0 {
                            pipelines.debug = None;
                        } else {
                            pipelines.debug = Pipelines::from_ordinal(current as i8);
                        }
                    }

                    // Camera
                    let camera_node = model.nodes.get(camera).unwrap();
                    let translation = camera_node.trs.get_translation();
                    let rotation = camera_node.trs.get_rotation();
                    ui.text(format!(
                        "Camera\n · trs ({:.2}, {:.2}, {:.2})\n · rot ({:.2}, {:.2}, {:.2}, {:.2})",
                        translation.x,
                        translation.y,
                        translation.z,
                        rotation.i,
                        rotation.j,
                        rotation.k,
                        rotation.w
                    ));
                });
        });
    }
/// Helper function to be called before ending a frame
Helper function to be called before ending a frame
Helper function to be called before ending a frame
pub fn draw_debug_window(
        &mut self,
        delta: f32,
        frame: &mut Frame,
        pipelines: &mut DefaultPipelines,
        model: &Model,
        camera: Handle<Node>,
    ) {
        self.update(delta, &mut frame.res, |ui| {
            im::Window::new(im::im_str!("Debug"))
                .no_decoration()
                .always_auto_resize(true)
                .save_settings(false)
                .focus_on_appearing(false)
                .no_nav()
                .position([16.0, 16.0], im::Condition::Always)
                .bg_alpha(0.33)
                .build(ui, || {
                    // Pipeline
                    let mut current = if pipelines.debug.is_none() {
                        0
                    } else {
                        pipelines.debug.unwrap() as usize
                    };
                    ui.text("Pipeline:");
                    let items = [
                        im::im_str!("None"),
                        im::im_str!("Albedo"),
                        im::im_str!("Normal"),
                    ];
                    ui.text(" · ");
                    ui.same_line(0.0);
                    if im::ComboBox::new(im::im_str!("")).build_simple(
                        &ui,
                        &mut current,
                        &items,
                        &|&s| s.into(),
                    ) {
                        if current == 0 {
                            pipelines.debug = None;
                        } else {
                            pipelines.debug = Pipelines::from_ordinal(current as i8);
                        }
                    }
                    // Camera
                    let camera_node = model.nodes.get(camera).unwrap();
                    let translation = camera_node.trs.get_translation();
                    let rotation = camera_node.trs.get_rotation();
                    ui.text(format!(
                        "Camera\n · trs ({:.2}, {:.2}, {:.2})\n · rot ({:.2}, {:.2}, {:.2}, {:.2})",
                        translation.x,
                        translation.y,
                        translation.z,
                        rotation.i,
                        rotation.j,
                        rotation.k,
                        rotation.w
                    ));
                });
        });
    }
pub fn draw_debug_window ( & mut self , delta : f32 , frame : & mut Frame , pipelines : & mut DefaultPipelines , model : & Model , camera : Handle < Node > , ) { self . update ( delta , & mut frame . res , | ui | { im :: Window :: new ( im :: im_str ! ( " " ) ) . no_decoration ( ) . always_auto_resize ( true ) . save_settings ( false ) . focus_on_appearing ( false ) . no_nav ( ) . position ( [ 16.0 , 16.0 ] , im :: Condition :: Always ) . bg_alpha ( 0.33 ) . build ( ui , | | { // Pipeline let mut current = if pipelines . debug . is_none ( ) { 0 } else { pipelines . debug . unwrap ( ) as usize } ; ui . text ( " " ) ; let items = [ im :: im_str ! ( " " ) , im :: im_str ! ( " " ) , im :: im_str ! ( " " ) , ] ; ui . text ( " ) ; ui . same_line ( 0.0 ) ; if im :: ComboBox :: new ( im :: im_str ! ( " " ) ) . build_simple ( & ui , & mut current , & items , & | & s | s . into ( ) , ) { if current == 0 { pipelines . debug = None ; } else { pipelines . debug = Pipelines :: from_ordinal ( current as i8 ) ; } } // Camera let camera_node = model . nodes . get ( camera ) . unwrap ( ) ; let translation = camera_node . trs . get_translation ( ) ; let rotation = camera_node . trs . get_rotation ( ) ; ui . text ( format ! ( " \n n  translation x translation y translation z rotation i rotation j rotation k rotation w ) ) ; } ) ; } ) ; }
Helper function to be called before ending a frame
Helper function to be called before ending a frame
&mut self
delta
f32
frame
&mut Frame
pipelines
&mut DefaultPipelines
model
&Model
camera
Handle<Node>
&mut self
delta
f32
frame
&mut Frame
pipelines
&mut DefaultPipelines
model
&Model
camera
Handle<Node>