Struct three_d::core::VertexBuffer [−][src]
pub struct VertexBuffer { /* fields omitted */ }
Expand description
A buffer containing per vertex data, for example positions, normals, uv coordinates or colors (see also use_attribute, use_attribute_vec2, etc.).
Implementations
impl VertexBuffer
[src]
impl VertexBuffer
[src]pub fn new_with_static_u8(
context: &Context,
data: &[u8]
) -> Result<VertexBuffer, Error>
[src]
pub fn new_with_static_u8(
context: &Context,
data: &[u8]
) -> Result<VertexBuffer, Error>
[src]Creates a new vertex buffer and fills it with the data in the given byte array. Use this method instead of new_with_dynamic_u8 when you do not expect the data to change very often.
pub fn fill_with_static_u8(&mut self, data: &[u8])
[src]
pub fn fill_with_static_u8(&mut self, data: &[u8])
[src]Fills the vertex buffer with the data in the given byte array. Use this method instead of fill_with_dynamic_u8 when you expect the data to change often.
pub fn new_with_dynamic_u8(
context: &Context,
data: &[u8]
) -> Result<VertexBuffer, Error>
[src]
pub fn new_with_dynamic_u8(
context: &Context,
data: &[u8]
) -> Result<VertexBuffer, Error>
[src]Creates a new vertex buffer and fill it with the data in the given byte array. Use this method instead of new_with_static_u8 when you expect the data to change often.
pub fn fill_with_dynamic_u8(&mut self, data: &[u8])
[src]
pub fn fill_with_dynamic_u8(&mut self, data: &[u8])
[src]Fills the vertex buffer with the data in the given byte array. Use this method instead of fill_with_static_u8 when you expect the data to change often.
pub fn new_with_static_f32(
context: &Context,
data: &[f32]
) -> Result<VertexBuffer, Error>
[src]
pub fn new_with_static_f32(
context: &Context,
data: &[f32]
) -> Result<VertexBuffer, Error>
[src]Creates a new vertex buffer and fill it with the data in the given float array. Use this method instead of new_with_dynamic_f32 when you do not expect the data to change very often.
pub fn fill_with_static_f32(&mut self, data: &[f32])
[src]
pub fn fill_with_static_f32(&mut self, data: &[f32])
[src]Fills the vertex buffer with the data in the given float array. Use this method instead of fill_with_dynamic_f32 when you expect the data to change often.
pub fn new_with_dynamic_f32(
context: &Context,
data: &[f32]
) -> Result<VertexBuffer, Error>
[src]
pub fn new_with_dynamic_f32(
context: &Context,
data: &[f32]
) -> Result<VertexBuffer, Error>
[src]Creates a new vertex buffer and fill it with the data in the given float array. Use this method instead of new_with_static_f32 when you do not expect the data to change very often.
pub fn fill_with_dynamic_f32(&mut self, data: &[f32])
[src]
pub fn fill_with_dynamic_f32(&mut self, data: &[f32])
[src]Fills the vertex buffer with the data in the given float array. Use this method instead of fill_with_static_f32 when you expect the data to change often.