diff --git a/app-proto/src/display.rs b/app-proto/src/display.rs index 14b132a..6f7ac71 100644 --- a/app-proto/src/display.rs +++ b/app-proto/src/display.rs @@ -517,7 +517,7 @@ pub fn Display() -> View { // write the spheres in world coordinates let sphere_reps_world: Vec<_> = scene.spheres.representations.into_iter().map( - |rep| &asm_to_world * rep + |rep| (&asm_to_world * rep).cast::() ).collect(); /* SCAFFOLDING */ @@ -554,17 +554,17 @@ pub fn Display() -> View { ctx.uniform2f(resolution_loc.as_ref(), width, height); ctx.uniform1f(shortdim_loc.as_ref(), width.min(height)); - // pass the assembly data + // pass the scene data ctx.uniform1i(sphere_cnt_loc.as_ref(), sphere_cnt); for n in 0..sphere_reps_world.len() { let v = &sphere_reps_world[n]; - ctx.uniform3f( + ctx.uniform3fv_with_f32_array( sphere_sp_locs[n].as_ref(), - v[0] as f32, v[1] as f32, v[2] as f32 + v.rows(0, 3).as_slice() ); - ctx.uniform2f( + ctx.uniform2fv_with_f32_array( sphere_lt_locs[n].as_ref(), - v[3] as f32, v[4] as f32 + v.rows(3, 2).as_slice() ); ctx.uniform3fv_with_f32_array( sphere_color_locs[n].as_ref(),