/// Finish rendering a 3D scene and starts next (present) subpass
Finish rendering a 3D scene and starts next (present) subpass
Finish rendering a 3D scene and starts next ( present ) subpass
pub fn end_scene(&mut self, frame: &mut Frame) {
        frame.res.command_buffer.next_subpass();
        let present_pipeline = self.pipelines.get_presentation();
        frame.res.command_buffer.bind_pipeline(present_pipeline);
        if frame.res.descriptors.present_sets.is_empty() {
            frame.res.descriptors.present_sets = frame
                .res
                .descriptors
                .allocate(&present_pipeline.set_layouts);
            PresentVertex::write_set(
                &self.dev.device,
                frame.res.descriptors.present_sets[0],
                &frame.buffer.albedo_view,
                &frame.buffer.normal_view,
                &frame.res.fallback.white_sampler,
            );
        }
        frame.res.command_buffer.bind_descriptor_sets(
            present_pipeline,
            &frame.res.descriptors.present_sets,
            0,
        );
        frame
            .res
            .command_buffer
            .bind_vertex_buffer(&frame.res.fallback.present_buffer);
        frame.res.command_buffer.draw(3);
    }
pub fn end_scene ( & mut self , frame : & mut Frame ) { frame . res . command_buffer . next_subpass ( ) ; let present_pipeline = self . pipelines . get_presentation ( ) ; frame . res . command_buffer . bind_pipeline ( present_pipeline ) ; if frame . res . descriptors . present_sets . is_empty ( ) { frame . res . descriptors . present_sets = frame . res . descriptors . allocate ( & present_pipeline . set_layouts ) ; PresentVertex :: write_set ( & self . dev . device , frame . res . descriptors . present_sets [ 0 ] , & frame . buffer . albedo_view , & frame . buffer . normal_view , & frame . res . fallback . white_sampler , ) ; } frame . res . command_buffer . bind_descriptor_sets ( present_pipeline , & frame . res . descriptors . present_sets , 0 , ) ; frame . res . command_buffer . bind_vertex_buffer ( & frame . res . fallback . present_buffer ) ; frame . res . command_buffer . draw ( 3 ) ; }
Finish rendering a 3D scene and starts next (present) subpass
Finish rendering a 3D scene and starts next ( present ) subpass
&mut self
frame
&mut Frame