pub struct VertexBuffer<G>where
G: Gl,{
pub elements_per_data: u32,
pub ele_type: BufferElementType,
pub byte_offset: u32,
pub stride: u32,
/* private fields */
}
Expand description
A subset of a data buffer for use with OpenGL vertex data.
A data buffer may contain a lot of data per vertex, such as position, normal, tangent, color etc. A VertexBuffer is then a subset of this data - perhaps picking out just the position, for example, for a set of vertices
OpenGL will have one copy of the data for all the VertexBuffer
Fields§
§elements_per_data: u32
Number of elements per vertex (1 to 4, or 4, 9 or 16)
ele_type: BufferElementType
The type of each element
byte_offset: u32
Offset from start of buffer to first byte of data
stride: u32
Stride of data in the buffer - 0 for elements_per_data*sizeof(ele_type)
Implementations§
Trait Implementations§
Source§impl<G> Clone for VertexBuffer<G>where
G: Gl,
impl<G> Clone for VertexBuffer<G>where
G: Gl,
Source§impl<G> Debug for VertexBuffer<G>
impl<G> Debug for VertexBuffer<G>
Source§impl<G> Default for VertexBuffer<G>where
G: Gl,
impl<G> Default for VertexBuffer<G>where
G: Gl,
Source§impl<G> Display for VertexBuffer<G>where
G: Gl,
impl<G> Display for VertexBuffer<G>where
G: Gl,
impl<G> DefaultIndentedDisplay for VertexBuffer<G>where
G: Gl,
Auto Trait Implementations§
impl<G> Freeze for VertexBuffer<G>
impl<G> RefUnwindSafe for VertexBuffer<G>
impl<G> Send for VertexBuffer<G>
impl<G> Sync for VertexBuffer<G>
impl<G> Unpin for VertexBuffer<G>
impl<G> UnwindSafe for VertexBuffer<G>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more