pub struct AnySamplesPassedQuery { /* private fields */ }Expand description
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.
Implementations§
Source§impl AnySamplesPassedQuery
impl AnySamplesPassedQuery
Sourcepub fn new<F>(
facade: &F,
conservative: bool,
) -> Result<AnySamplesPassedQuery, QueryCreationError>
pub fn new<F>( facade: &F, conservative: bool, ) -> Result<AnySamplesPassedQuery, QueryCreationError>
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.
Source§impl AnySamplesPassedQuery
impl AnySamplesPassedQuery
Sourcepub fn get(self) -> bool
pub fn get(self) -> bool
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.
Sourcepub fn to_buffer_u32(
&self,
target: BufferSlice<'_, u32>,
) -> Result<(), ToBufferError>
pub 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 necessarily supported everywhere.
Trait Implementations§
Source§impl Debug for AnySamplesPassedQuery
impl Debug for AnySamplesPassedQuery
Source§impl<'a> From<&'a AnySamplesPassedQuery> for SamplesQueryParam<'a>
impl<'a> From<&'a AnySamplesPassedQuery> for SamplesQueryParam<'a>
Source§fn from(r: &'a AnySamplesPassedQuery) -> SamplesQueryParam<'a>
fn from(r: &'a AnySamplesPassedQuery) -> SamplesQueryParam<'a>
Auto Trait Implementations§
impl !Freeze for AnySamplesPassedQuery
impl !RefUnwindSafe for AnySamplesPassedQuery
impl !Send for AnySamplesPassedQuery
impl !Sync for AnySamplesPassedQuery
impl Unpin for AnySamplesPassedQuery
impl UnsafeUnpin for AnySamplesPassedQuery
impl !UnwindSafe for AnySamplesPassedQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.