Going to just normalize to a single hardcoded enum of vertex definitions. Seems like quite a backpeddle....
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user