pub struct NativeWindow { /* private fields */ }Implementations§
Source§impl NativeWindow
impl NativeWindow
pub fn new(conf: &Conf) -> Result<NativeWindow, String>
pub fn size(&self) -> (u32, u32)
pub fn framebuffer_size(&self) -> (u32, u32)
pub fn dpi_scale(&self) -> f32
Sourcepub fn recreate(&mut self) -> Result<(), String>
pub fn recreate(&mut self) -> Result<(), String>
Recreate the OS drawable and GPU caches. CPU mesh/material handles survive. Failure leaves the existing host in place.
pub fn driver_info(&self) -> String
pub fn set_swap_interval(&mut self, interval: i32)
pub fn set_cursor(&mut self, grab: bool, visible: bool)
pub fn poll(&mut self) -> Vec<Event>
Sourcepub fn present(
&mut self,
vertices: &[[f32; 8]],
batches: &[Batch],
clear: Color,
)
pub fn present( &mut self, vertices: &[[f32; 8]], batches: &[Batch], clear: Color, )
Uploads one complete clip-space stream and draws valid triangle batches. Invalid or out-of-range batch ranges are ignored. Call on the creating thread.
pub fn last_mesh_upload_bytes(&self) -> u64
Sourcepub fn sprite_upload_bytes(&self) -> u64
pub fn sprite_upload_bytes(&self) -> u64
Actual palette uniform bytes submitted in color and shadow programs.
pub fn skin_upload_bytes(&self) -> u64
pub fn enable_gpu_timing(&mut self) -> bool
pub fn drain_gpu_results(&mut self, f: impl FnMut(u64, f64))
pub fn finish_gpu_timing(&mut self)
pub fn render_counts(&self) -> (u64, u64)
Sourcepub fn post_target(&self) -> Option<(i32, bool)>
pub fn post_target(&self) -> Option<(i32, bool)>
Sample count and half-float use of the post target, when created.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NativeWindow
impl !RefUnwindSafe for NativeWindow
impl !Send for NativeWindow
impl !Sync for NativeWindow
impl Unpin for NativeWindow
impl UnwindSafe for NativeWindow
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