Added template dynamic vertex.
This commit is contained in:
@@ -80,20 +80,20 @@ impl Pair<GlyphInstance> {
|
||||
pub struct GenericCanvasFrame<H, V, In> {
|
||||
frame_data: HashMap<H, Vec<(Vec<V>, Vec<In>)>>
|
||||
}
|
||||
|
||||
impl<V, In> GenericCanvasFrame<Vertex3D, V, In> {
|
||||
|
||||
/// Creates a bare canvas frame with empty accumulators
|
||||
pub fn new() -> GenericCanvasFrame<Vertex3D, V, In> {
|
||||
GenericCanvasFrame {
|
||||
frame_data: Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn draw(&mut self, drawable: &dyn DrawableTest<V, Vertex3D, In>) {
|
||||
self.frame_data
|
||||
.entry(drawable.get_handle().clone())
|
||||
.or_insert(Vec::new())
|
||||
.push((drawable.get_vertices(), drawable.get_instances()));
|
||||
}
|
||||
}
|
||||
//
|
||||
//impl<V, In> GenericCanvasFrame<Vertex3D, V, In> {
|
||||
//
|
||||
// /// Creates a bare canvas frame with empty accumulators
|
||||
// pub fn new() -> GenericCanvasFrame<Vertex3D, V, In> {
|
||||
// GenericCanvasFrame {
|
||||
// frame_data: Default::default()
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn draw(&mut self, drawable: &dyn DrawableTest<V, Vertex3D, In>) {
|
||||
// self.frame_data
|
||||
// .entry(drawable.get_handle().clone())
|
||||
// .or_insert(Vec::new())
|
||||
// .push((drawable.get_vertices(), drawable.get_instances()));
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user