Loading files
use drawing;
use geometry::Matrix4;
pub struct ShapeDrawable {
buffers: drawing::Buffers
}
impl ShapeDrawable {
pub fn new(buffers: drawing::Buffers, _color: drawing::Color) -> Self {
ShapeDrawable {
buffers
}
}
}
impl super::Drawable for ShapeDrawable {
fn draw(&self, buffers: &mut drawing::Buffers){
self.buffers.apply_to(buffers);
}
fn get_transform(&self) -> Matrix4 { Matrix4::identity() }
fn set_transform(&mut self, _transform: &Matrix4) {}
fn set_id(&mut self, id: u32) {
for vertex in &mut self.buffers.vbo {
vertex.id = id;
}
}
}4faa4c8b4This file is pinned to the selected release. Download the original to open it in your design tool.