[][src]Struct glium::draw_parameters::SamplesPassedQuery

pub struct SamplesPassedQuery { /* fields omitted */ }

A query that allows you to know the number of samples written to the output during the draw operations where this query was active.

If you just want to know whether or not some samples have been written, you should use a AnySamplesPassedQuery query instead.

Implementations

impl SamplesPassedQuery[src]

pub fn new<F: ?Sized>(
    facade: &F
) -> Result<SamplesPassedQuery, QueryCreationError> where
    F: Facade
[src]

Builds a new query.

impl SamplesPassedQuery[src]

pub fn is_ready(&self) -> bool[src]

Queries the counter to see if the result is already available.

pub 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.

pub 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 SamplesPassedQuery[src]

impl<'a> From<&'a SamplesPassedQuery> for SamplesQueryParam<'a>[src]

impl GlObject for SamplesPassedQuery[src]

type Id = c_uint

The type of identifier for this object.

Auto Trait Implementations

impl !RefUnwindSafe for SamplesPassedQuery

impl !Send for SamplesPassedQuery

impl !Sync for SamplesPassedQuery

impl Unpin for SamplesPassedQuery

impl !UnwindSafe for SamplesPassedQuery

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.