depth buffer compiles and switched to 3d vertices

This commit is contained in:
2019-09-11 22:04:43 -07:00
parent 73456dc58d
commit f6adbd80d1
12 changed files with 64 additions and 63 deletions

View File

@@ -16,6 +16,7 @@ pub struct Sprite {
}
/// Container class which implements drawable.
impl Sprite {
pub fn new(position: (f32, f32), size: (f32, f32)) -> Sprite {
@@ -54,6 +55,7 @@ impl Sprite {
}
}
///
pub fn new_with_texture(position: (f32, f32), size: (f32, f32), texture_handle: Arc<CanvasTextureHandle>) -> Sprite {
let fsize = (size.0 as f32, size.1 as f32);
@@ -88,6 +90,7 @@ impl Sprite {
}
impl Drawable for Sprite {
fn get_vertices(&self) -> Vec<(f32,f32)> {
self.vertices.to_vec()
}