From c7d13e2721482772c12b44773777c5902f25848c Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 4 Mar 2020 07:20:49 -0600 Subject: removed surface from inits, now have vector of tessalations, added all the c84 colors --- src/main.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 81b8585..546628f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,7 +48,7 @@ fn gen_viewports() -> Vec { } fn main() { - let surface = GlfwSurface::new( + let mut surface = GlfwSurface::new( WindowDim::Windowed(constants::WIDTH, constants::HEIGHT), "revision2020", WindowOpt::default(), @@ -64,8 +64,8 @@ fn main() { //let mut stream = audio::init(); //stream.play(); - let (mut tom, surface) = Tom::new(surface); - let (mut n1ck, mut surface) = N1ck::new(surface); + let mut tom = Tom::new(); + let mut n1ck = N1ck::new(); let viewports = gen_viewports(); @@ -90,13 +90,9 @@ fn main() { pipeline_state = pipeline_state.set_viewport(*viewport); pipeline_state = pipeline_state.enable_clear_color(false); - if i == 0 { + if i == 0 || i == 3 { surface = tom.draw(surface, &back_buffer, &program, &pipeline_state); - } else if i == 1 { - surface = n1ck.draw(surface, &back_buffer, &program, &pipeline_state); - } else if i == 2 { - surface = tom.draw(surface, &back_buffer, &program, &pipeline_state); - } else if i == 3 { + } else if i == 1 || i == 2 { surface = n1ck.draw(surface, &back_buffer, &program, &pipeline_state); } } -- cgit v1.2.3