[][src]Struct conrod_vulkano::Renderer

pub struct Renderer { /* fields omitted */ }

A type used for translating render::Primitives into Commands that indicate how to draw the conrod GUI using vulkano.

Methods

impl Renderer[src]

pub fn new<'a, L>(
    device: Arc<Device>,
    subpass: Subpass<L>,
    graphics_queue_family: QueueFamily<'a>,
    window_dims: [u32; 2],
    dpi_factor: f64
) -> Result<Self, RendererCreationError> where
    L: RenderPassDesc + RenderPassAbstract + Send + Sync + 'static, 
[src]

Construct a new empty Renderer.

The dimensions of the glyph cache will be the dimensions of the window multiplied by the DPI factor.

pub fn with_glyph_cache_dimensions<'a, L>(
    device: Arc<Device>,
    subpass: Subpass<L>,
    graphics_queue_family: QueueFamily<'a>,
    glyph_cache_dims: [u32; 2]
) -> Result<Self, RendererCreationError> where
    L: RenderPassDesc + RenderPassAbstract + Send + Sync + 'static, 
[src]

Construct a new empty Renderer.

pub fn commands(&self) -> Commands[src]

Produce an Iterator yielding Commands.

pub fn fill<'a, P: PrimitiveWalker>(
    &'a mut self,
    image_map: &Map<Image>,
    viewport: [f32; 4],
    dpi_factor: f64,
    primitives: P
) -> Result<Option<GlyphCacheCommand<'a>>, CacheWriteErr>
[src]

Fill the inner vertex and command buffers by translating the given primitives.

This method may return an Option<GlyphCacheCommand>, in which case the user should use the contained glyph_cpu_buffer_pool to write the pixel data to the GPU, and then use a copy_buffer_to_image command to write the data to the given glyph_cache_texture image.

pub fn draw(
    &mut self,
    queue: Arc<Queue>,
    image_map: &Map<Image>,
    viewport: [f32; 4]
) -> Result<Vec<DrawCommand>, DrawError>
[src]

Draws using the inner list of Commands to a list of DrawCommands compatible with the vulkano command buffer builders.

Uses the given queue for submitting vertex buffers.

Note: If you require more granular control over rendering, you may want to use the fill and commands methods separately. This method is simply a convenience wrapper around those methods for the case that the user does not require accessing or modifying conrod's draw parameters, uniforms or generated draw commands.

Auto Trait Implementations

impl !RefUnwindSafe for Renderer

impl Send for Renderer

impl Sync for Renderer

impl Unpin for Renderer

impl !UnwindSafe for Renderer

Blanket Implementations

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

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

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

impl<T> Content for T[src]

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

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

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.

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.