Struct conrod_vulkano::Renderer
source · pub struct Renderer { /* private fields */ }
Expand description
A type used for translating render::Primitives
into Command
s that indicate how to draw the
conrod GUI using vulkano
.
Implementations§
source§impl Renderer
impl Renderer
sourcepub 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,
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,
Construct a new empty Renderer
.
The dimensions of the glyph cache will be the dimensions of the window multiplied by the DPI factor.
sourcepub 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,
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,
Construct a new empty Renderer
.
sourcepub fn fill<P: PrimitiveWalker>(
&mut self,
image_map: &Map<Image>,
viewport: [f32; 4],
dpi_factor: f64,
primitives: P
) -> Result<GlyphCacheCommands, CacheWriteErr>
pub fn fill<P: PrimitiveWalker>(
&mut self,
image_map: &Map<Image>,
viewport: [f32; 4],
dpi_factor: f64,
primitives: P
) -> Result<GlyphCacheCommands, CacheWriteErr>
Fill the inner vertex and command buffers by translating the given primitives
.
sourcepub fn draw(
&mut self,
queue: Arc<Queue>,
image_map: &Map<Image>,
viewport: [f32; 4]
) -> Result<Vec<DrawCommand>, DrawError>
pub fn draw(
&mut self,
queue: Arc<Queue>,
image_map: &Map<Image>,
viewport: [f32; 4]
) -> Result<Vec<DrawCommand>, DrawError>
Draws using the inner list of Command
s to a list of DrawCommand
s 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.