[][src]Struct rustbatch::render::buffer::Buffer

pub struct Buffer { /* fields omitted */ }

Buffer is used for customizing how is the vertex data processed

Implementations

impl Buffer[src]

pub fn default() -> Self[src]

default returns default buffer

pub fn no_texture() -> Self[src]

pub fn new(vertexes: &[Vertex]) -> Self[src]

new returns new buffer from Vertexes

pub fn bind(&self)[src]

bind uses the buffer. you still have to call draw afterwards

pub fn set_vertices(&self, vertices: &[f32])[src]

set_vertices sets vertices and adds default indices so you can draw

pub fn set_vertices_and_indices(&self, vertices: &[f32], indices: &[u32])[src]

set_vertices_and_indices sets vertices and custom indices

pub fn draw(&self, amount: usize)[src]

draw draws the buffer

Trait Implementations

impl Drop for Buffer[src]

Auto Trait Implementations

impl RefUnwindSafe for Buffer

impl Send for Buffer

impl Sync for Buffer

impl Unpin for Buffer

impl UnwindSafe for Buffer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,