- let program = mandelwow_program(&display);
- let bounding_box_program = solid_fill_program(&display);
+ // Draw the bounding box before the fractal, when the Z-buffer is still clear, so the lines
+ // behind the semi-translucent areas will be drawn.
+ if bounding_box_enabled {
+ let uniforms = uniform! {
+ model: model,
+ view: camera.get_view(),
+ perspective: camera.get_perspective(),
+ };
+ bounding_box(&display, &mut frame, &bounding_box_program, &uniforms, &bounds);
+ }