Struct rin::gl::attributes::VertexBufferBinding [−][src]
pub struct VertexBufferBinding<T, B> where
B: BufferRange<T>, { pub index: usize, pub buffer: B, pub divisor: usize, pub marker: PhantomData<T>, }
Representation of a binding of a buffer to a vertex buffer binding point
Also allows to specify a divisor for the binding
Used internally by a VAO to bind attributes from a buffer
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBindVertexBuffer.xhtml https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glVertexBindingDivisor.xhtml
Fields
index: usize
buffer: B
divisor: usize
marker: PhantomData<T>
Implementations
impl<T, B> VertexBufferBinding<T, B> where
B: BufferRange<T>,
[src]
impl<T, B> VertexBufferBinding<T, B> where
B: BufferRange<T>,
[src]pub fn divisor(self, divisor: usize) -> VertexBufferBinding<T, B>
[src]
Trait Implementations
impl<T, B> Clone for VertexBufferBinding<T, B> where
B: Clone + BufferRange<T>,
T: Clone,
[src]
impl<T, B> Clone for VertexBufferBinding<T, B> where
B: Clone + BufferRange<T>,
T: Clone,
[src]pub fn clone(&self) -> VertexBufferBinding<T, B>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T, B> Debug for VertexBufferBinding<T, B> where
B: Debug + BufferRange<T>,
T: Debug,
[src]
impl<T, B> Debug for VertexBufferBinding<T, B> where
B: Debug + BufferRange<T>,
T: Debug,
[src]impl<T, B> DynVertexBufferBinding for VertexBufferBinding<T, B> where
B: 'static + BufferRange<T>,
T: 'static,
[src]
impl<T, B> DynVertexBufferBinding for VertexBufferBinding<T, B> where
B: 'static + BufferRange<T>,
T: 'static,
[src]pub fn index(&self) -> usize
[src]
pub fn offset_in_buffer(&self) -> usize
[src]
pub fn stride(&self) -> usize
[src]
pub fn divisor(&self) -> usize
[src]
pub fn enable_for(
&self,
vao: &Vao,
gl: &mut State<'_>,
capabilities: &Capabilities
)
[src]
&self,
vao: &Vao,
gl: &mut State<'_>,
capabilities: &Capabilities
)
pub fn len(&self) -> usize
[src]
pub fn buffer_id(&self) -> u32
[src]
pub fn is_empty(&self) -> bool
[src]
Auto Trait Implementations
impl<T, B> RefUnwindSafe for VertexBufferBinding<T, B> where
B: RefUnwindSafe,
T: RefUnwindSafe,
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B> Send for VertexBufferBinding<T, B> where
B: Send,
T: Send,
B: Send,
T: Send,
impl<T, B> Sync for VertexBufferBinding<T, B> where
B: Sync,
T: Sync,
B: Sync,
T: Sync,
impl<T, B> Unpin for VertexBufferBinding<T, B> where
B: Unpin,
T: Unpin,
B: Unpin,
T: Unpin,
impl<T, B> UnwindSafe for VertexBufferBinding<T, B> where
B: UnwindSafe,
T: UnwindSafe,
B: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]