[−][src]Struct gfx_glyph::DrawBuilder
Short-lived builder for drawing glyphs, constructed from GlyphBrush::use_queue
.
Example
glyph_brush .use_queue() .depth_target(&gfx_depth) .draw(&mut gfx_encoder, &gfx_color)?;
Methods
impl<'a, 'font, R: Resources, F: Factory<R>, H: BuildHasher, DV> DrawBuilder<'a, 'font, R, F, H, DV>
[src]
pub fn transform<M: Into<[[f32; 4]; 4]>>(self, transform: M) -> Self
[src]
Use a custom position transform (e.g. a projection) replacing the default_transform
.
Example
let projection = gfx_glyph::default_transform(&gfx_color); glyph_brush.use_queue().transform(projection)
pub fn depth_target<D>(self, depth: &'a D) -> DrawBuilder<'a, 'font, R, F, H, D>
[src]
Set a depth buffer target to perform depth testing against.
Example
glyph_brush.use_queue().depth_target(&gfx_depth)
Raw usage
Can also be used with gfx raw depth views if necessary. The Format
must also be provided.
glyph_brush .use_queue() .depth_target(&(raw_depth_view, format::Depth::get_format()))
impl<'a, R: Resources, F: Factory<R>, H: BuildHasher, DV: RawAndFormat<Raw = RawDepthStencilView<R>>, '_> DrawBuilder<'a, '_, R, F, H, DV>
[src]
pub fn draw<C, CV>(
self,
encoder: &mut Encoder<R, C>,
target: &CV
) -> Result<(), String> where
C: CommandBuffer<R>,
CV: RawAndFormat<Raw = RawRenderTargetView<R>>,
[src]
self,
encoder: &mut Encoder<R, C>,
target: &CV
) -> Result<(), String> where
C: CommandBuffer<R>,
CV: RawAndFormat<Raw = RawRenderTargetView<R>>,
Draws all queued sections onto a render target.
See queue
.
Trims the cache, see caching behaviour.
Example
glyph_brush .use_queue() .draw(&mut gfx_encoder, &gfx_color)?;
Raw usage
Can also be used with gfx raw render views if necessary. The Format
must also be provided.
glyph_brush .use_queue() .draw(&mut gfx_encoder, &(raw_render_view, format::Srgba8::get_format()))?;
impl<'a, R: Resources, F: Factory<R>, H: BuildHasher, '_> DrawBuilder<'a, '_, R, F, H, ()>
[src]
pub fn draw<C, CV>(
self,
encoder: &mut Encoder<R, C>,
target: &CV
) -> Result<(), String> where
C: CommandBuffer<R>,
CV: RawAndFormat<Raw = RawRenderTargetView<R>>,
[src]
self,
encoder: &mut Encoder<R, C>,
target: &CV
) -> Result<(), String> where
C: CommandBuffer<R>,
CV: RawAndFormat<Raw = RawRenderTargetView<R>>,
Auto Trait Implementations
impl<'a, 'font, R, F, H, DV> Send for DrawBuilder<'a, 'font, R, F, H, DV> where
DV: Sync,
F: Send,
H: Send,
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::DepthStencilView: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
DV: Sync,
F: Send,
H: Send,
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::DepthStencilView: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
impl<'a, 'font, R, F, H, DV> Sync for DrawBuilder<'a, 'font, R, F, H, DV> where
DV: Sync,
F: Sync,
H: Sync,
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::DepthStencilView: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
DV: Sync,
F: Sync,
H: Sync,
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::DepthStencilView: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,