Struct glium::draw_parameters::PrimitivesGeneratedQuery
source · pub struct PrimitivesGeneratedQuery { /* private fields */ }
Expand description
Query that allows you to know the number of primitives generated by the geometry shader.
Will stay at 0
if you use it without any active geometry shader.
Implementations§
source§impl PrimitivesGeneratedQuery
impl PrimitivesGeneratedQuery
sourcepub fn new<F>(
facade: &F
) -> Result<PrimitivesGeneratedQuery, QueryCreationError>
pub fn new<F>( facade: &F ) -> Result<PrimitivesGeneratedQuery, QueryCreationError>
Builds a new query.
source§impl PrimitivesGeneratedQuery
impl PrimitivesGeneratedQuery
sourcepub fn get(self) -> u32
pub 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.
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 PrimitivesGeneratedQuery
impl Debug for PrimitivesGeneratedQuery
Auto Trait Implementations§
impl !RefUnwindSafe for PrimitivesGeneratedQuery
impl !Send for PrimitivesGeneratedQuery
impl !Sync for PrimitivesGeneratedQuery
impl Unpin for PrimitivesGeneratedQuery
impl !UnwindSafe for PrimitivesGeneratedQuery
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.