Struct NativeWindow

Source
pub struct NativeWindow { /* private fields */ }

Implementations§

Source§

impl NativeWindow

Source

pub fn new(conf: &Conf) -> Result<NativeWindow, String>

Source

pub fn size(&self) -> (u32, u32)

Source

pub fn driver_info(&self) -> String

Source

pub fn set_swap_interval(&mut self, interval: i32)

Requests a nonnegative swap interval when an installed GLX extension provides it.

Source

pub fn set_cursor(&mut self, grab: bool, visible: bool)

Idempotent cursor control. A successful grab emits relative MouseDelta events. Failed grabs are retried on later calls, and focus loss releases confinement.

Source

pub fn poll(&mut self) -> Vec<Event>

Source

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.

Source

pub fn last_mesh_upload_bytes(&self) -> u64

Source

pub fn enable_gpu_timing(&mut self) -> bool

Source

pub fn drain_gpu_results(&mut self, f: impl FnMut(u64, f64))

Source

pub fn finish_gpu_timing(&mut self)

Source

pub fn render_counts(&self) -> (u64, u64)

Source

pub fn pixels(&self) -> Vec<u8> ⓘ

Reads the last presented image as top-to-bottom RGBA8. Returns empty if closed, unavailable, or larger than 16,777,216 pixels.

Trait Implementations§

Source§

impl Drop for NativeWindow

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.