use ecs::World; use ui::prelude::*; use vulkan_rs::prelude::*; use crate::Result; use std::sync::Arc; use crate::prelude::*; pub trait TScene: Send + Sync + 'static { fn process( &mut self, buffer_recorder: &mut CommandBufferRecorder<'_>, images: &TargetMode>>, indices: &TargetMode, world: &World, ) -> Result<()>; fn resize( &mut self, window_width: f32, window_height: f32, images: &TargetMode>>, ) -> Result<()>; } pub trait RenderCore: std::fmt::Debug + Send + Sync { fn next_frame(&mut self, world: &mut World) -> Result; fn resize(&mut self, world: &mut World, w: u32, h: u32) -> Result<()>; fn format(&self) -> VkFormat; fn image_layout(&self) -> VkImageLayout { VK_IMAGE_LAYOUT_PRESENT_SRC_KHR } // render routines fn add_render_routine(&mut self, priority: u32); fn remove_render_routine(&mut self); fn set_clear_color(&self, color: [f32; 4]); // getter fn image_count(&self) -> usize; fn images(&self) -> TargetMode>>; fn width(&self) -> u32; fn height(&self) -> u32; fn transformations(&self) -> Option<(VRTransformations, VRTransformations)>; }