pub struct ShaderSystemState {
pub initialized: bool,
pub programs_loaded: u32,
pub materials_loaded: u32,
pub textures_loaded: u32,
pub compile_errors: u32,
pub compile_warnings: u32,
pub last_error: Option<String>,
pub uptime_frames: u64,
pub total_draw_calls: u64,
pub total_triangles: u64,
}Fields§
§initialized: bool§programs_loaded: u32§materials_loaded: u32§textures_loaded: u32§compile_errors: u32§compile_warnings: u32§last_error: Option<String>§uptime_frames: u64§total_draw_calls: u64§total_triangles: u64Implementations§
Source§impl ShaderSystemState
impl ShaderSystemState
pub fn new() -> Self
pub fn initialize(&mut self)
pub fn record_draw(&mut self, triangles: u64)
pub fn record_compile_error(&mut self, msg: impl Into<String>)
pub fn record_compile_warning(&mut self)
pub fn tick_frame(&mut self)
pub fn is_healthy(&self) -> bool
pub fn avg_tris_per_call(&self) -> f64
pub fn summary(&self) -> String
Trait Implementations§
Source§impl Clone for ShaderSystemState
impl Clone for ShaderSystemState
Source§impl Debug for ShaderSystemState
impl Debug for ShaderSystemState
Auto Trait Implementations§
impl Freeze for ShaderSystemState
impl RefUnwindSafe for ShaderSystemState
impl Send for ShaderSystemState
impl Sync for ShaderSystemState
impl Unpin for ShaderSystemState
impl UnsafeUnpin for ShaderSystemState
impl UnwindSafe for ShaderSystemState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.