+ let shaded_cube = ShadedCube::new(&display, &Cube::default(), &shaded_program);
+
+ const SEA_XSIZE: usize = 24;
+ const SEA_ZSIZE: usize = 20;
+ let sea_xmin = -14.0f32;
+ let sea_xmax = 14.0f32;
+ let sea_y = -2.5;
+ let sea_zmin = -2.0f32;
+ let sea_zmax = -26.0f32;
+ let sea_xstep = (sea_xmax - sea_xmin) / (SEA_XSIZE as f32);
+ let sea_zstep = (sea_zmax - sea_zmin) / (SEA_ZSIZE as f32);
+
+ let mut sea = [[Vector3::zero(); SEA_ZSIZE]; SEA_XSIZE];
+ for x in 0..SEA_XSIZE {
+ for z in 0..SEA_ZSIZE {
+ sea[x][z] = Vector3 {
+ x: sea_xmin + (x as f32) * sea_xstep,
+ y: sea_y,
+ z: sea_zmin + (z as f32) * sea_zstep,
+ };
+ }
+ }
+
+ let mut frame_cnt = 0;
+ let mut last_report_time = Instant::now();
+ let mut last_report_frame_cnt = 0;