Skip to content

Commit 89d9c2b

Browse files
committed
Light module documentation
1 parent 3d31424 commit 89d9c2b

File tree

2 files changed

+116
-32
lines changed

2 files changed

+116
-32
lines changed

citro3d/examples/fragment-light.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ fn main() {
329329
})));
330330

331331
// Subtle spotlight pointed at the top of the cube.
332-
let light_idx = light_env.as_mut().create_light().unwrap();
333-
let mut light = light_env.as_mut().light_mut(light_idx).unwrap();
332+
let light = light_env.as_mut().create_light().unwrap();
333+
let mut light = light_env.as_mut().light_mut(light).unwrap();
334334
light.as_mut().set_color(0.5, 0.5, 0.5);
335335
light
336336
.as_mut()
@@ -353,8 +353,6 @@ fn main() {
353353
view.translate(0.0, 0.0, -2.0);
354354
instance.bind_vertex_uniform(model_idx, view);
355355

356-
// Configure the first fragment shading substage to just pass through the vertex color
357-
// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight
358356
let stage0 = texenv::Stage::new(0).unwrap();
359357
instance
360358
.texenv(stage0)
@@ -444,8 +442,6 @@ struct Projections {
444442
}
445443

446444
fn calculate_projections() -> Projections {
447-
// TODO: it would be cool to allow playing around with these parameters on
448-
// the fly with D-pad, etc.
449445
let slider_val = ctru::os::current_3d_slider_state();
450446
let interocular_distance = slider_val / 2.0;
451447

0 commit comments

Comments
 (0)