Struct nannou::ui::backend::glium::glium::draw_parameters::TimeElapsedQuery
[−]
[src]
pub struct TimeElapsedQuery { /* fields omitted */ }
A query that allows you to know the number of nanoseconds that have elapsed during the draw operations.
TODO: not sure that it's nanoseconds
Methods
impl TimeElapsedQuery
[src]
fn new<F>(facade: &F) -> Result<TimeElapsedQuery, QueryCreationError> where
F: Facade + ?Sized,
[src]
F: Facade + ?Sized,
Builds a new query.
impl TimeElapsedQuery
[src]
fn is_ready(&self) -> bool
[src]
Queries the counter to see if the result is already available.
fn get(self) -> u32
[src]
Returns the value of the query. Blocks until it is available.
This function doesn't block if is_ready
would return true.
Note that you are strongly discouraged from calling this in the middle of the rendering process, as it may block for a long time.
Queries should either have their result written into a buffer, be used for conditional rendering, or stored and checked during the next frame.
fn to_buffer_u32(&self, target: BufferSlice<u32>) -> Result<(), ToBufferError>
[src]
Writes the result of the query to a buffer when it is available.
This function doesn't block. Instead it submits a commands to the GPU's commands queue and orders the GPU to write the result of the query to a buffer.
This operation is not necessarily supported everywhere.
Trait Implementations
impl Debug for TimeElapsedQuery
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.