added hello-world example + modified vkproccessor to live inside specs

This commit is contained in:
2020-08-08 23:38:44 -07:00
parent b070a7dd32
commit c10115e7b9
15 changed files with 150 additions and 102 deletions

View File

@@ -1,10 +1,10 @@
use crate::canvas::canvas_frame::Drawable;
use crate::util::vertex::{VertexType, ColorVertex3D};
use crate::util::vertex::{VertexTypeContainer, ColorVertex3D};
///
#[derive(Debug, Clone)]
pub struct Text {
pub verts: VertexType,
pub verts: VertexTypeContainer,
position: (f32, f32),
size: (f32, f32),
@@ -129,7 +129,7 @@ impl Text {
};
Text {
verts: VertexType::TextType(verts),
verts: VertexTypeContainer::TextType(verts),
position: position,
size: size,
}
@@ -137,7 +137,7 @@ impl Text {
}
impl Drawable for Text {
fn get(&self, window_size: (u32, u32)) -> Vec<VertexType> {
fn get(&self, window_size: (u32, u32)) -> Vec<VertexTypeContainer> {
vec![self.verts.clone()]
}
}