pub struct RenderStateTracker {Show 13 fields
pub current_shader: Option<u32>,
pub current_material: Option<u32>,
pub current_vao: Option<u32>,
pub current_fbo: Option<u32>,
pub blend_enabled: bool,
pub depth_test_enabled: bool,
pub cull_enabled: bool,
pub scissor_enabled: bool,
pub state_changes: u32,
pub shader_switches: u32,
pub material_switches: u32,
pub texture_uploads: u32,
pub frame: u64,
}Fields§
§current_shader: Option<u32>§current_material: Option<u32>§current_vao: Option<u32>§current_fbo: Option<u32>§blend_enabled: bool§depth_test_enabled: bool§cull_enabled: bool§scissor_enabled: bool§state_changes: u32§shader_switches: u32§material_switches: u32§texture_uploads: u32§frame: u64Implementations§
Source§impl RenderStateTracker
impl RenderStateTracker
pub fn new() -> Self
pub fn begin_frame(&mut self)
pub fn bind_shader(&mut self, id: u32) -> bool
pub fn bind_material(&mut self, id: u32) -> bool
pub fn redundancy_rate(&self) -> f32
pub fn reset_bindings(&mut self)
Trait Implementations§
Source§impl Clone for RenderStateTracker
impl Clone for RenderStateTracker
Source§impl Debug for RenderStateTracker
impl Debug for RenderStateTracker
Auto Trait Implementations§
impl Freeze for RenderStateTracker
impl RefUnwindSafe for RenderStateTracker
impl Send for RenderStateTracker
impl Sync for RenderStateTracker
impl Unpin for RenderStateTracker
impl UnsafeUnpin for RenderStateTracker
impl UnwindSafe for RenderStateTracker
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.