Trait glin::attributes::DynVertexBufferBinding[][src]

pub trait DynVertexBufferBinding: Any {
    fn index(&self) -> usize;
fn offset_in_buffer(&self) -> usize;
fn stride(&self) -> usize;
fn divisor(&self) -> usize;
fn enable_for(
        &self,
        vao: &Vao,
        state: &mut State<'_>,
        capabilities: &Capabilities
    );
fn len(&self) -> usize;
fn buffer_id(&self) -> u32; fn is_empty(&self) -> bool { ... } }

Representation of a vertex element as an attribute in a GL buffer

Used internally by a VAO to bind attributes from a buffer

Required methods

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,
    state: &mut State<'_>,
    capabilities: &Capabilities
)
[src]

fn len(&self) -> usize[src]

fn buffer_id(&self) -> u32[src]

Loading content...

Provided methods

fn is_empty(&self) -> bool[src]

Loading content...

Implementations

impl dyn DynVertexBufferBinding[src]

pub fn is<T: DynVertexBufferBinding>(&self) -> bool[src]

Returns true if the boxed type is the same as T

pub fn downcast_ref<T: DynVertexBufferBinding>(&self) -> Option<&T>[src]

Returns some reference to the boxed value if it is of type T, or None if it isn’t.

pub unsafe fn downcast_ref_unchecked<T: DynVertexBufferBinding>(&self) -> &T[src]

Returns a reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

pub fn downcast_mut<T: DynVertexBufferBinding>(&mut self) -> Option<&mut T>[src]

Returns some mutable reference to the boxed value if it is of type T, or None if it isn’t.

pub unsafe fn downcast_mut_unchecked<T: DynVertexBufferBinding>(
    &mut self
) -> &mut T
[src]

Returns a mutable reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

impl dyn DynVertexBufferBinding[src]

pub fn downcast<T: DynVertexBufferBinding>(
    self: Box<Self>
) -> Result<Box<T>, Box<Self>>
[src]

Returns the boxed value if it is of type T, or Err(Self) if it isn’t.

pub unsafe fn downcast_unchecked<T: DynVertexBufferBinding>(
    self: Box<Self>
) -> Box<T>
[src]

Returns the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Implementors

impl<T: 'static, B: BufferRange<T> + 'static> DynVertexBufferBinding for VertexBufferBinding<T, B>[src]

Loading content...