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

source

pub fn new<F>( facade: &F ) -> Result<TransformFeedbackPrimitivesWrittenQuery, QueryCreationError>where F: Facade + ?Sized,

Builds a new query.

source§

impl TransformFeedbackPrimitivesWrittenQuery

source

pub fn is_ready(&self) -> bool

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

source

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.

source

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 TransformFeedbackPrimitivesWrittenQuery

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl GlObject for TransformFeedbackPrimitivesWrittenQuery

§

type Id = u32

The type of identifier for this object.
source§

fn get_id(&self) -> c_uint

Returns the id of the object.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.