summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2020-03-04 07:20:49 -0600
committerTom Barrett <tom@tombarrett.xyz>2020-03-04 07:20:49 -0600
commitc7d13e2721482772c12b44773777c5902f25848c (patch)
treead87eaa9487c4336febe8ec07d39077e67897f58 /src/main.rs
parent0c0b348971ee209679b571977115537daf9288cf (diff)
removed surface from inits, now have vector of tessalations, added all the c84 colors
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 5 insertions, 9 deletions
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<Viewport> {
}
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);
}
}