Struct stark::graphics::Engine [−][src]
pub struct Engine<B: Backend> { clear: [f32; 4], lines: Vec<[f32; 4]>, colors: Vec<[f32; 3]>, buflen: u64, state: GraphicsState<B>, should_configure_swapchain: bool, }
Expand description
Sail-specific graphics engine state
Fields
clear: [f32; 4]
lines: Vec<[f32; 4]>
colors: Vec<[f32; 3]>
buflen: u64
state: GraphicsState<B>
should_configure_swapchain: bool
Implementations
impl<B: Backend> Engine<B>
[src]
impl<B: Backend> Engine<B>
[src]fn new(state: GraphicsState<B>) -> Self
[src]
fn new(state: GraphicsState<B>) -> Self
[src]Initialize the graphics engine
fn add_line(&mut self, points: [f32; 4], color: [f32; 3])
[src]
fn add_line(&mut self, points: [f32; 4], color: [f32; 3])
[src]Add a line, with two endpoints and a color
fn empty_lines(&mut self)
[src]
fn empty_lines(&mut self)
[src]Empty the engine of all lines
fn state_pipeline_setup(&mut self)
[src]
fn state_pipeline_setup(&mut self)
[src]Set up an appropriate graphics pipeline for the engine
fn state_buffer_setup(&mut self)
[src]
fn state_buffer_setup(&mut self)
[src]Acquire memory and create buffer for vertex data
fn buffer_size_check(&mut self)
[src]
fn buffer_size_check(&mut self)
[src]Check whether the buffer has enough space for all vertices
fn draw_frame(&mut self)
[src]
fn draw_frame(&mut self)
[src]Draw a single frame according to the engine state
Auto Trait Implementations
impl<B> RefUnwindSafe for Engine<B> where
<B as Backend>::Buffer: RefUnwindSafe,
<B as Backend>::CommandBuffer: RefUnwindSafe,
<B as Backend>::CommandPool: RefUnwindSafe,
<B as Backend>::Device: RefUnwindSafe,
<B as Backend>::Fence: RefUnwindSafe,
<B as Backend>::Framebuffer: RefUnwindSafe,
<B as Backend>::GraphicsPipeline: RefUnwindSafe,
<B as Backend>::Instance: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::PhysicalDevice: RefUnwindSafe,
<B as Backend>::PipelineLayout: RefUnwindSafe,
<B as Backend>::Queue: RefUnwindSafe,
<B as Backend>::QueueFamily: RefUnwindSafe,
<B as Backend>::RenderPass: RefUnwindSafe,
<B as Backend>::Semaphore: RefUnwindSafe,
<B as Backend>::Surface: RefUnwindSafe,
<B as Backend>::Buffer: RefUnwindSafe,
<B as Backend>::CommandBuffer: RefUnwindSafe,
<B as Backend>::CommandPool: RefUnwindSafe,
<B as Backend>::Device: RefUnwindSafe,
<B as Backend>::Fence: RefUnwindSafe,
<B as Backend>::Framebuffer: RefUnwindSafe,
<B as Backend>::GraphicsPipeline: RefUnwindSafe,
<B as Backend>::Instance: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::PhysicalDevice: RefUnwindSafe,
<B as Backend>::PipelineLayout: RefUnwindSafe,
<B as Backend>::Queue: RefUnwindSafe,
<B as Backend>::QueueFamily: RefUnwindSafe,
<B as Backend>::RenderPass: RefUnwindSafe,
<B as Backend>::Semaphore: RefUnwindSafe,
<B as Backend>::Surface: RefUnwindSafe,
impl<B> Send for Engine<B>
impl<B> Sync for Engine<B>
impl<B> Unpin for Engine<B> where
<B as Backend>::Buffer: Unpin,
<B as Backend>::CommandBuffer: Unpin,
<B as Backend>::CommandPool: Unpin,
<B as Backend>::Device: Unpin,
<B as Backend>::Fence: Unpin,
<B as Backend>::Framebuffer: Unpin,
<B as Backend>::GraphicsPipeline: Unpin,
<B as Backend>::Instance: Unpin,
<B as Backend>::Memory: Unpin,
<B as Backend>::PhysicalDevice: Unpin,
<B as Backend>::PipelineLayout: Unpin,
<B as Backend>::Queue: Unpin,
<B as Backend>::QueueFamily: Unpin,
<B as Backend>::RenderPass: Unpin,
<B as Backend>::Semaphore: Unpin,
<B as Backend>::Surface: Unpin,
<B as Backend>::Buffer: Unpin,
<B as Backend>::CommandBuffer: Unpin,
<B as Backend>::CommandPool: Unpin,
<B as Backend>::Device: Unpin,
<B as Backend>::Fence: Unpin,
<B as Backend>::Framebuffer: Unpin,
<B as Backend>::GraphicsPipeline: Unpin,
<B as Backend>::Instance: Unpin,
<B as Backend>::Memory: Unpin,
<B as Backend>::PhysicalDevice: Unpin,
<B as Backend>::PipelineLayout: Unpin,
<B as Backend>::Queue: Unpin,
<B as Backend>::QueueFamily: Unpin,
<B as Backend>::RenderPass: Unpin,
<B as Backend>::Semaphore: Unpin,
<B as Backend>::Surface: Unpin,
impl<B> UnwindSafe for Engine<B> where
<B as Backend>::Buffer: UnwindSafe,
<B as Backend>::CommandBuffer: UnwindSafe,
<B as Backend>::CommandPool: UnwindSafe,
<B as Backend>::Device: UnwindSafe,
<B as Backend>::Fence: UnwindSafe,
<B as Backend>::Framebuffer: UnwindSafe,
<B as Backend>::GraphicsPipeline: UnwindSafe,
<B as Backend>::Instance: UnwindSafe,
<B as Backend>::Memory: UnwindSafe,
<B as Backend>::PhysicalDevice: UnwindSafe,
<B as Backend>::PipelineLayout: UnwindSafe,
<B as Backend>::Queue: UnwindSafe,
<B as Backend>::QueueFamily: UnwindSafe,
<B as Backend>::RenderPass: UnwindSafe,
<B as Backend>::Semaphore: UnwindSafe,
<B as Backend>::Surface: UnwindSafe,
<B as Backend>::Buffer: UnwindSafe,
<B as Backend>::CommandBuffer: UnwindSafe,
<B as Backend>::CommandPool: UnwindSafe,
<B as Backend>::Device: UnwindSafe,
<B as Backend>::Fence: UnwindSafe,
<B as Backend>::Framebuffer: UnwindSafe,
<B as Backend>::GraphicsPipeline: UnwindSafe,
<B as Backend>::Instance: UnwindSafe,
<B as Backend>::Memory: UnwindSafe,
<B as Backend>::PhysicalDevice: UnwindSafe,
<B as Backend>::PipelineLayout: UnwindSafe,
<B as Backend>::Queue: UnwindSafe,
<B as Backend>::QueueFamily: UnwindSafe,
<B as Backend>::RenderPass: UnwindSafe,
<B as Backend>::Semaphore: UnwindSafe,
<B as Backend>::Surface: UnwindSafe,