pub struct TransformFeedbackPrimitivesWrittenQuery { /* private fields */ }Expand description
Query that allows you to know the number of primitives generated by transform feedback.
Implementations§
Source§impl TransformFeedbackPrimitivesWrittenQuery
impl TransformFeedbackPrimitivesWrittenQuery
Sourcepub fn new<F>(
facade: &F,
) -> Result<TransformFeedbackPrimitivesWrittenQuery, QueryCreationError>
pub fn new<F>( facade: &F, ) -> Result<TransformFeedbackPrimitivesWrittenQuery, QueryCreationError>
Builds a new query.
Source§impl TransformFeedbackPrimitivesWrittenQuery
impl TransformFeedbackPrimitivesWrittenQuery
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.