Going to just normalize to a single hardcoded enum of vertex definitions. Seems like quite a backpeddle....

This commit is contained in:
2020-02-10 23:39:58 -08:00
parent cd0c1e6052
commit 80c0d323be
7 changed files with 162 additions and 76 deletions

View File

@@ -39,8 +39,18 @@ In Shader lie the shader compilers, pipelines, and supporting data.
I need to put them where I create them. The actual shader doesn't.
=== canvas frame ===
The current workflow:
enum of vertex types
sprite holds vertex::type1
poly holds vertex::type2
canvasframe holds <enumType>
canvasState.run takes canvasFrame<enumType>
canvasState.draw_commands_test(command_buffer, framebuffers, image_num, canvas_frame);
@@ -48,13 +58,35 @@ In Shader lie the shader compilers, pipelines, and supporting data.
--------------------
===== Links =====
Dynamic Keys in HashMap
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=b4630cf98afa88fc0fbffdb0112af1c1
VertexDefinition
https://github.com/tomaka/vulkano-examples/blob/81f5a4eb3c5f3fcc6a194d3c41e53b2bc66f7add/gltf/gltf_system.rs#L687-L795
pub enum Content {
Text(String),
Number(u32),
}
impl From for String {
fn wrap(self) {
Content::Text(self)
}
}
impl From for u32 {
fn wrap(self) {
Content::Number(self)
}
}
fn any_content<T>(value : T) where T : IntoContent {
let content : Content = value.wrap();
}