Skip to content

Commit

Permalink
Removed useless Context::set_clear_color
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkriff committed Nov 13, 2016
1 parent f3db665 commit 001eb50
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Context {
Context {
data: data,
win_size: win_size,
clear_color: [0.0, 0.0, 1.0, 1.0],
clear_color: [0.7, 0.7, 0.7, 1.0],
window: window,
device: device,
factory: factory,
Expand All @@ -135,10 +135,6 @@ impl Context {
}
}

pub fn set_clear_color(&mut self, color: [f32; 4]) {
self.clear_color = color;
}

pub fn clear(&mut self) {
self.encoder.clear(&self.data.out, self.clear_color);
self.encoder.clear_depth(&self.data.out_depth, 1.0);
Expand Down
1 change: 0 additions & 1 deletion src/main_menu_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ impl MainMenuScreen {

impl Screen for MainMenuScreen {
fn tick(&mut self, context: &mut Context, _: Time) {
context.set_clear_color([0.7, 0.7, 0.7, 1.0]);
context.clear();
context.set_basic_color([0.0, 0.0, 0.0, 1.0]);
self.button_manager.draw(context);
Expand Down
1 change: 0 additions & 1 deletion src/tactical_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ impl TacticalScreen {
}

fn draw(&mut self, context: &mut Context, dtime: Time) {
context.set_clear_color([0.7, 0.7, 0.7, 1.0]);
context.clear();
self.draw_scene(context, dtime);
let player_info = self.player_info.get(self.core.player_id());
Expand Down
1 change: 0 additions & 1 deletion src/visualizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ impl Visualizer {

fn draw(&mut self) {
let dtime = self.update_time();
self.context.set_clear_color([0.8, 0.8, 0.8, 1.0]);
self.context.clear();
{
let screen = self.screens.last_mut().unwrap();
Expand Down

0 comments on commit 001eb50

Please sign in to comment.