Struct glin::attributes::VertexBufferBinding [−][src]
pub struct VertexBufferBinding<T, 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: BufferRange<T>> VertexBufferBinding<T, B>
[src]
impl<T, B: BufferRange<T>> VertexBufferBinding<T, B>
[src]pub fn divisor(self, divisor: usize) -> VertexBufferBinding<T, B>
[src]
Trait Implementations
impl<T: Clone, B: Clone + BufferRange<T>> Clone for VertexBufferBinding<T, B>
[src]
impl<T: Clone, B: Clone + BufferRange<T>> Clone for VertexBufferBinding<T, B>
[src]fn clone(&self) -> VertexBufferBinding<T, B>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug, B: Debug + BufferRange<T>> Debug for VertexBufferBinding<T, B>
[src]
impl<T: Debug, B: Debug + BufferRange<T>> Debug for VertexBufferBinding<T, B>
[src]impl<T: 'static, B: BufferRange<T> + 'static> DynVertexBufferBinding for VertexBufferBinding<T, B>
[src]
impl<T: 'static, B: BufferRange<T> + 'static> DynVertexBufferBinding for VertexBufferBinding<T, B>
[src]fn index(&self) -> usize
[src]
fn offset_in_buffer(&self) -> usize
[src]
fn stride(&self) -> usize
[src]
fn divisor(&self) -> usize
[src]
fn enable_for(&self, vao: &Vao, gl: &mut State<'_>, capabilities: &Capabilities)
[src]
fn len(&self) -> usize
[src]
fn buffer_id(&self) -> u32
[src]
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,