[−][src]Trait rustbatch::render::batch::Target
Required methods
fn append(
&mut self,
data: &[f32],
pattern: &[u32],
vertex_size: u32,
program: Option<&Program>,
texture: Option<&Texture>,
buffer: Option<&Buffer>
)
&mut self,
data: &[f32],
pattern: &[u32],
vertex_size: u32,
program: Option<&Program>,
texture: Option<&Texture>,
buffer: Option<&Buffer>
)
Implementations on Foreign Types
impl Target for Window
[src]
fn append(
&mut self,
data: &[f32],
pattern: &[u32],
_: u32,
program: Option<&Program>,
texture: Option<&Texture>,
buffer: Option<&Buffer>
)
[src]
&mut self,
data: &[f32],
pattern: &[u32],
_: u32,
program: Option<&Program>,
texture: Option<&Texture>,
buffer: Option<&Buffer>
)
Implementors
impl Target for Batch
[src]
fn append(
&mut self,
data: &[f32],
pattern: &[u32],
vertex_size: u32,
_: Option<&Program>,
_: Option<&Texture>,
_: Option<&Buffer>
)
[src]
&mut self,
data: &[f32],
pattern: &[u32],
vertex_size: u32,
_: Option<&Program>,
_: Option<&Texture>,
_: Option<&Buffer>
)
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]
fn append(
&mut self,
data: &[f32],
pattern: &[u32],
vertex_size: u32,
_: Option<&Program>,
_: Option<&Texture>,
_: Option<&Buffer>
)
[src]
&mut self,
data: &[f32],
pattern: &[u32],
vertex_size: u32,
_: Option<&Program>,
_: Option<&Texture>,
_: Option<&Buffer>
)