pub enum BufferUsage {
StreamDraw,
StreamRead,
StreamCopy,
StaticDraw,
StaticRead,
StaticCopy,
DynamicDraw,
DynamicRead,
DynamicCopy,
}Expand description
A hint for video driver that allows it to optimize buffer’s content for more efficient use.
Variants§
StreamDraw
The buffer contents will be modified once and used at most a few times. The buffer contents are modified by the application, and used as the source for drawing and image specification commands.
StreamRead
The buffer contents will be modified once and used at most a few times. The buffer contents are modified by reading data from the GPU, and used to return that data when queried by the application.
StreamCopy
The buffer contents will be modified once and used at most a few times. The buffer contents are modified by the application, and used as the source for drawing and image specification commands.
StaticDraw
The buffer contents will be modified once and used many times. The buffer contents are modified by the application, and used as the source for drawing and image specification commands.
StaticRead
The buffer contents will be modified once and used many times. The buffer contents are modified by reading data from the GPU, and used to return that data when queried by the application.
StaticCopy
The buffer contents will be modified once and used many times. The buffer contents are modified by reading data from the GPU, and used as the source for drawing and image specification commands.
DynamicDraw
The buffer contents will be modified repeatedly and used many times. The buffer contents are modified by the application, and used as the source for drawing and image specification commands.
DynamicRead
The buffer contents will be modified repeatedly and used many times. The buffer contents are modified by reading data from the GPU, and used to return that data when queried by the application.
DynamicCopy
The buffer contents will be modified repeatedly and used many times. The buffer contents are modified by reading data from the GPU, and used as the source for drawing and image specification commands.
Trait Implementations§
Source§impl Clone for BufferUsage
impl Clone for BufferUsage
Source§fn clone(&self) -> BufferUsage
fn clone(&self) -> BufferUsage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BufferUsage
impl Debug for BufferUsage
Source§impl Hash for BufferUsage
impl Hash for BufferUsage
Source§impl PartialEq for BufferUsage
impl PartialEq for BufferUsage
impl Copy for BufferUsage
impl Eq for BufferUsage
impl StructuralPartialEq for BufferUsage
Auto Trait Implementations§
impl Freeze for BufferUsage
impl RefUnwindSafe for BufferUsage
impl Send for BufferUsage
impl Sync for BufferUsage
impl Unpin for BufferUsage
impl UnwindSafe for BufferUsage
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.