pub struct Gfx {
pub adapter: Adapter,
pub device: Device,
pub queue: Queue,
pub surface: Surface<'static>,
pub surface_config: Option<SurfaceConfiguration>,
pub last_update: TimeStamp,
pub time: Arc<Mutex<f32>>,
pub limit_fps: LimitFPS,
pub fps_history: Vec<f32>,
pub delta_time: f32,
}Fields§
§adapter: Adapter§device: Device§queue: Queue§surface: Surface<'static>§surface_config: Option<SurfaceConfiguration>§last_update: TimeStamp§time: Arc<Mutex<f32>>§limit_fps: LimitFPS§fps_history: Vec<f32>§delta_time: f32Implementations§
Source§impl Gfx
impl Gfx
pub async fn new(window: impl Into<SurfaceTarget<'static>>) -> Self
pub fn set_zero_dt(&mut self)
pub fn with_fps(self, fps: f32) -> Self
pub fn with_no_fps_limit(self) -> Self
pub fn resize(&mut self, width: u32, height: u32)
pub fn test(&self) -> Result<(), SurfaceError>
Auto Trait Implementations§
impl !Freeze for Gfx
impl !RefUnwindSafe for Gfx
impl Send for Gfx
impl Sync for Gfx
impl Unpin for Gfx
impl !UnwindSafe for Gfx
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