in the middle of expirimenting with was to implement this drawable api

This commit is contained in:
2019-10-11 22:46:35 -07:00
parent 1551a53d1e
commit 595937d68f
4 changed files with 63 additions and 20 deletions

View File

@@ -97,12 +97,16 @@ impl Sprite {
}
}
impl<V, H> DrawableTest<V, H> for Sprite {
impl<V, H, In> DrawableTest<V, H, In> for Sprite {
fn get_vertices(&self) -> Vec<V> {
unimplemented!()
}
fn get_handle(&self) -> Vec<H> {
fn get_instances(&self) -> Vec<In> {
unimplemented!()
}
fn get_handle(&self) -> H {
unimplemented!()
}
}
@@ -285,12 +289,28 @@ impl Text {
}
}
impl<V, H> DrawableTest<V, H> for Text {
pub trait TextHandle {
fn do_nothing() -> u32;
}
pub trait TextInstance {
fn get_thing() -> Vec<(u32, u32, u32)>;
}
pub trait TextVertex {
fn get_vertices() -> Vec<(u32, u32, u32)>;
}
impl<V: TextVertex, H: TextHandle, In: TextInstance> DrawableTest<V, H, In> for Text {
fn get_vertices(&self) -> Vec<V> {
unimplemented!()
}
fn get_handle(&self) -> Vec<H> {
fn get_instances(&self) -> Vec<In> {
unimplemented!()
}
fn get_handle(&self) -> H {
unimplemented!()
}
}