[][src]Struct processing::draw_parameters::AnySamplesPassedQuery

pub struct AnySamplesPassedQuery { /* fields omitted */ }

A query type that allows you to know whether any sample has been written to the output during the operations executed with this query.

OpenGL

This is usually a query of type GL_ANY_SAMPLES_PASSED or GL_ANY_SAMPLES_PASSED_CONSERVATIVE.

However if the backend doesn't support conservative queries, glium will automatically fall back to a non-conservative query. If the backend doesn't support either types but supports GL_SAMPLES_PASSED, then glium will automatically use a GL_SAMPLES_PASSED query instead.

Methods

impl AnySamplesPassedQuery[src]

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

Builds a new query.

If you pass true for conservative, then OpenGL may use a less accurate algorithm, leading to a faster result but with more false positives.

impl AnySamplesPassedQuery[src]

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

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

pub fn get(self) -> bool[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<'a> From<&'a AnySamplesPassedQuery> for SamplesQueryParam<'a>[src]

impl Debug for AnySamplesPassedQuery[src]

impl GlObject for AnySamplesPassedQuery[src]

type Id = u32

The type of identifier for this object.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T[src]