.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user