pub struct TextMaterial { /* private fields */ }
Expand description
A single channel material storing rasterized font glyphs.
Implementations§
Source§impl TextMaterial
impl TextMaterial
Sourcepub fn texture(&self) -> &Texture2DRef
pub fn texture(&self) -> &Texture2DRef
Returns the GPU texture storing the currently rasterized font glyphs.
Trait Implementations§
Source§impl Clone for TextMaterial
impl Clone for TextMaterial
Source§fn clone(&self) -> TextMaterial
fn clone(&self) -> TextMaterial
Returns a duplicate 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 Material for TextMaterial
impl Material for TextMaterial
Source§fn id(&self) -> u16
fn id(&self) -> u16
Returns a unique ID for each variation of the shader source returned from Material::fragment_shader_source. Read more
Source§fn fragment_shader_source(&self, _lights: &[&dyn Light]) -> String
fn fragment_shader_source(&self, _lights: &[&dyn Light]) -> String
Returns the fragment shader source for this material.
Source§fn fragment_attributes(&self) -> FragmentAttributes
fn fragment_attributes(&self) -> FragmentAttributes
Returns a FragmentAttributes struct that describes which fragment attributes,
ie. the input from the vertex shader, are required for rendering with this material.
Source§fn use_uniforms(
&self,
program: &Program,
camera: &Camera,
_lights: &[&dyn Light],
)
fn use_uniforms( &self, program: &Program, camera: &Camera, _lights: &[&dyn Light], )
Sends the uniform data needed for this material to the fragment shader.
Source§fn render_states(&self) -> RenderStates
fn render_states(&self) -> RenderStates
Returns the render states needed to render with this material.
Source§fn material_type(&self) -> MaterialType
fn material_type(&self) -> MaterialType
Returns the type of material.
Auto Trait Implementations§
impl Freeze for TextMaterial
impl RefUnwindSafe for TextMaterial
impl !Send for TextMaterial
impl !Sync for TextMaterial
impl Unpin for TextMaterial
impl UnwindSafe for TextMaterial
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