Only use backing buffer if post process is enabled.
@@ -346,7 +346,9 @@ fn tock(rltk : &mut Rltk, gamestate: &mut Box<GameState>, frames: &mut i32, prev
}
// Bind to the backing buffer
+ if rltk.post_scanlines {
rltk.backing_buffer.bind(&rltk.gl);
+ }
// Clear the screen
unsafe {
@@ -361,6 +363,7 @@ fn tock(rltk : &mut Rltk, gamestate: &mut Box<GameState>, frames: &mut i32, prev
cons.console.gl_draw(font, shader, &rltk.gl);
}
+ if rltk.post_scanlines {
// Now we return to the primary screen
rltk.backing_buffer.default(&rltk.gl);
unsafe {
@@ -376,6 +379,7 @@ fn tock(rltk : &mut Rltk, gamestate: &mut Box<GameState>, frames: &mut i32, prev
rltk.gl.DrawArrays(gl::TRIANGLES, 0, 6);
}
}
+}
/// For A-Z menus, translates the keys A through Z into 0..25
pub fn letter_to_option(key : VirtualKeyCode) -> i32 {
