pub struct PrimitivesEmitter {
pub shader: Option<ShaderRef>,
pub textures: SmallVec<[SpriteTexture; 4]>,
pub uniforms: HashMap<Cow<'static, str>, GlowUniformValue>,
pub blending: Option<GlowBlending>,
pub screen_space: bool,
}
Fields§
§shader: Option<ShaderRef>
§textures: SmallVec<[SpriteTexture; 4]>
§uniforms: HashMap<Cow<'static, str>, GlowUniformValue>
§blending: Option<GlowBlending>
§screen_space: bool
Implementations§
Source§impl PrimitivesEmitter
impl PrimitivesEmitter
pub fn single(texture: SpriteTexture) -> Self
pub fn shader(self, value: ShaderRef) -> Self
pub fn texture(self, value: SpriteTexture) -> Self
pub fn uniform(self, key: Cow<'static, str>, value: GlowUniformValue) -> Self
pub fn blending(self, value: GlowBlending) -> Self
pub fn screen_space(self, value: bool) -> Self
pub fn emit_lines<I: IntoIterator<Item = Vec2<f32>>>( &self, vertices: I, ) -> LinesDraw<'_, I>
pub fn emit_brush<I: IntoIterator<Item = (Vec2<f32>, f32, Rgba<f32>)>>( &self, vertices: I, ) -> BrushDraw<'_, I>
pub fn emit_triangles<I: IntoIterator<Item = [Vertex; 3]>>( &self, vertices: I, ) -> TrianglesDraw<'_, I>
pub fn emit_triangle_fan<I: IntoIterator<Item = Vertex>>( &self, vertices: I, ) -> TriangleFanDraw<'_, I>
pub fn emit_triangle_strip<I: IntoIterator<Item = Vertex>>( &self, vertices: I, ) -> TriangleStripDraw<'_, I>
pub fn emit_regular_polygon( &self, vertices: usize, position: Vec2<f32>, radius: f32, ) -> RegularPolygonDraw<'_>
pub fn emit_circle( &self, position: Vec2<f32>, radius: f32, maximum_error: f32, ) -> RegularPolygonDraw<'_>
Trait Implementations§
Source§impl Clone for PrimitivesEmitter
impl Clone for PrimitivesEmitter
Source§fn clone(&self) -> PrimitivesEmitter
fn clone(&self) -> PrimitivesEmitter
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrimitivesEmitter
impl Debug for PrimitivesEmitter
Source§impl Default for PrimitivesEmitter
impl Default for PrimitivesEmitter
Source§fn default() -> PrimitivesEmitter
fn default() -> PrimitivesEmitter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PrimitivesEmitter
impl !RefUnwindSafe for PrimitivesEmitter
impl !Send for PrimitivesEmitter
impl !Sync for PrimitivesEmitter
impl Unpin for PrimitivesEmitter
impl !UnwindSafe for PrimitivesEmitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more