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: u64state: GraphicsState<B>should_configure_swapchain: bool

Implementations

impl<B: Backend> Engine<B>[src]

fn new(state: GraphicsState<B>) -> Self[src]

Initialize the graphics engine

fn set_clear(&mut self, clear: [f32; 4])[src]

Set the clear (background) color

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]

Empty the engine of all lines

fn state_pipeline_setup(&mut self)[src]

Set up an appropriate graphics pipeline for the engine

fn state_buffer_setup(&mut self)[src]

Acquire memory and create buffer for vertex data

fn buffer_size_check(&mut self)[src]

Check whether the buffer has enough space for all vertices

fn setup(&mut self)[src]

Prepare the engine to accept draw calls

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

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.