[][src]Trait rustbatch::render::batch::Target

pub trait Target {
    fn append(
        &mut self,
        data: &[f32],
        pattern: &[u32],
        vertex_size: u32,
        program: Option<&Program>,
        texture: Option<&Texture>,
        buffer: Option<&Buffer>
    ); }

Required methods

fn append(
    &mut self,
    data: &[f32],
    pattern: &[u32],
    vertex_size: u32,
    program: Option<&Program>,
    texture: Option<&Texture>,
    buffer: Option<&Buffer>
)

Loading content...

Implementations on Foreign Types

impl Target for Window[src]

Loading content...

Implementors

impl Target for Batch[src]

fn append(
    &mut self,
    data: &[f32],
    pattern: &[u32],
    vertex_size: u32,
    _: Option<&Program>,
    _: Option<&Texture>,
    _: Option<&Buffer>
)
[src]

append appends vertex data to texture. pattern specifies how data is used. If you for example provide 4 vertexes you can make rectangle from it with pattern [0, 2, 3, 1, 2, 3]. If you don't know what i mean try to draw four points on paper, index them from 0 to 3 and connect them with lines in specified order.

Panics

If batch has custom buffer and buffers size do not corresponds to vertex_size you will get panic. This is mainly to prevent confusion in case of providing incorrect vertex data structure.

impl Target for VertexData[src]

impl Target for Canvas[src]

Loading content...