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

pub struct SamplesPassedQuery {
    // some 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.

Methods

impl SamplesPassedQuery

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

Builds a new query.

impl SamplesPassedQuery

fn is_ready(&self) -> bool[]

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

fn get(self) -> u32[]

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>[]

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 necessarly supported everywhere.

Trait Implementations

impl GlObject for SamplesPassedQuery

type Id = GLuint

fn get_id(&self) -> GLuint

Derived Implementations

impl Debug for SamplesPassedQuery

fn fmt(&self, __arg_0: &mut Formatter) -> Result