aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 55132bd..5e1632b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -158,6 +158,7 @@ const UNTYPED_COLOR: Color32 = Color32::from_rgb(0xb0, 0xb0, 0xb0);
#[derive(Clone, PartialEq, serde::Serialize, serde::Deserialize)]
enum DemoNode {
Constant(library::Constant),
+ Input(library::Input),
Builtin(library::BuiltinFunction),
Output(library::Output),
}
@@ -210,8 +211,8 @@ impl DemoNode {
}
pub fn all() -> impl Iterator<Item = Self> {
- library::Constant::all()
- .map(DemoNode::from)
+ (library::Constant::all().map(DemoNode::from))
+ .chain(library::Input::all().map(DemoNode::from))
.chain(library::Output::all().map(DemoNode::from))
.chain(library::BuiltinFunction::all().map(DemoNode::from))
}
@@ -220,6 +221,7 @@ impl fmt::Display for DemoNode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
DemoNode::Constant(x) => fmt::Display::fmt(x, f),
+ DemoNode::Input(x) => fmt::Display::fmt(x, f),
DemoNode::Builtin(x) => fmt::Display::fmt(x, f),
DemoNode::Output(x) => fmt::Display::fmt(x, f),
}
@@ -251,11 +253,11 @@ impl DemoViewer {
f,
"
#version 450
-in vec4 in_color;
+in vec2 in_uv;
out vec4 out_color;
void main() {{
- "
+"
)?;
while let Some(id) = order.pop() {
snarl[id].compile_node(id, snarl, f)?;