This commit is contained in:
2020-07-29 21:48:12 -07:00
parent e861378fab
commit f1d60493f4
7 changed files with 68 additions and 34 deletions

View File

@@ -7,12 +7,18 @@ use crate::canvas::managed::handles::{CanvasTextureHandle, CanvasImageHandle, Ca
use vulkano::pipeline::vertex::Vertex;
use std::any::Any;
use crate::VertexTypes;
use vulkano::sync::Event;
/// Trait which may be inherited by objects that wish to be drawn to the screen
pub trait Drawable {
fn get(&self) -> VertexTypes;
}
/// Trait which may be inherited by objects that wish to receive events
pub trait Eventable {
fn notify(&self, event: &Event) -> ();
}
/// Accumulator for Vectors of VertexTypes
#[derive(Default)]
pub struct CanvasFrame {
@@ -26,3 +32,6 @@ impl CanvasFrame {
self.map.push(drawable.get());
}
}