Skip to content

Commit

Permalink
Document ClearColorConfig (#9288)
Browse files Browse the repository at this point in the history
# Objective

Document the `ClearColorConfig` enum, and describe the behavior of its
variants.
  • Loading branch information
JoJoJet committed Jul 29, 2023
1 parent b4bc9e4 commit a88b9fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_core_pipeline/src/clear_color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize};
use bevy_render::{color::Color, extract_resource::ExtractResource};
use serde::{Deserialize, Serialize};

/// For a camera, specifies the color used to clear the viewport before rendering.
#[derive(Reflect, Serialize, Deserialize, Clone, Debug, Default)]
#[reflect(Serialize, Deserialize)]
pub enum ClearColorConfig {
/// The clear color is taken from the world's [`ClearColor`] resource.
#[default]
Default,
/// The given clear color is used, overriding the [`ClearColor`] resource defined in the world.
Custom(Color),
/// No clear color is used: the camera will simply draw on top of anything already in the viewport.
///
/// This can be useful when multiple cameras are rendering to the same viewport.
None,
}

Expand Down

0 comments on commit a88b9fc

Please sign in to comment.