|
@@ -5,6 +5,17 @@ extern crate vecmath;
|
|
|
use piston_window::*;
|
|
|
use vecmath::*;
|
|
|
|
|
|
+struct Board {
|
|
|
+ x: Vec<Option<Cell>>,
|
|
|
+ y: Vec<Option<Cell>>,
|
|
|
+}
|
|
|
+
|
|
|
+struct Cell {
|
|
|
+ age: u8,
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
fn main() {
|
|
|
let opengl = OpenGL::V3_2;
|
|
|
let (width, height) = (300, 300);
|
|
@@ -33,7 +44,7 @@ fn main() {
|
|
|
canvas.put_pixel(step, step, im::Rgba([0, 0, 0, 255]));
|
|
|
|
|
|
step += 1;
|
|
|
-
|
|
|
+
|
|
|
texture.update(&mut texture_context, &canvas).unwrap();
|
|
|
window.draw_2d(&e, |c, g, device| {
|
|
|
texture_context.encoder.flush(device);
|