Struct meshopt::VertexStream [−][src]
pub struct VertexStream<'a> {
pub data: *const u8,
pub stride: usize,
pub size: usize,
// some fields omitted
}Vertex attribute stream, similar to glVertexPointer
Each element takes size bytes, with stride controlling the spacing between successive elements.
Fields
data: *const u8Pointer to buffer which contains vertex data.
stride: usizeSpace between vertices inside the buffer (in bytes).
size: usizeThe size in bytes of the vertex attribute this Stream is representing.
Implementations
impl<'a> VertexStream<'a>[src]
impl<'a> VertexStream<'a>[src]pub fn new<T>(ptr: *const T) -> VertexStream<'a>[src]
Create a VertexStream for a buffer consisting only of elements of type T.
pub fn new_with_stride<T, VertexType>(
ptr: *const VertexType,
stride: usize
) -> VertexStream<'a>[src]
ptr: *const VertexType,
stride: usize
) -> VertexStream<'a>
Create a VertexStream for a buffer that contains elements of type VertexType.
The buffer pointed to by ptr starts with one value of T, the next value of T
is *(ptr + stride).
(The VertexType does not need to be a concrete type,
it is only used here to avoid casts on the caller side).
Trait Implementations
impl<'a> Clone for VertexStream<'a>[src]
impl<'a> Clone for VertexStream<'a>[src]