Trait rin::gl::attributes::DynVertexBufferBinding[][src]

pub trait DynVertexBufferBinding: Any {
    pub fn index(&self) -> usize;
pub fn offset_in_buffer(&self) -> usize;
pub fn stride(&self) -> usize;
pub fn divisor(&self) -> usize;
pub fn enable_for(
        &self,
        vao: &Vao,
        state: &mut State<'_>,
        capabilities: &Capabilities
    );
pub fn len(&self) -> usize;
pub fn buffer_id(&self) -> u32; pub 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

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

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

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

Loading content...

Provided methods

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

Loading content...

Implementations

impl dyn DynVertexBufferBinding + 'static[src]

pub fn downcast<T>(
    self: Box<dyn DynVertexBufferBinding + 'static, Global>
) -> Result<Box<T, Global>, Box<dyn DynVertexBufferBinding + 'static, Global>> where
    T: DynVertexBufferBinding
[src]

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

pub unsafe fn downcast_unchecked<T>(
    self: Box<dyn DynVertexBufferBinding + 'static, Global>
) -> Box<T, Global> where
    T: DynVertexBufferBinding
[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.

impl dyn DynVertexBufferBinding + 'static[src]

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

Returns true if the boxed type is the same as T

pub fn downcast_ref<T>(&self) -> Option<&T> where
    T: DynVertexBufferBinding
[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>(&self) -> &T where
    T: DynVertexBufferBinding
[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>(&mut self) -> Option<&mut T> where
    T: DynVertexBufferBinding
[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>(&mut self) -> &mut T where
    T: DynVertexBufferBinding
[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.

Implementors

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

Loading content...