|
|
@@ -290,9 +290,9 @@ fn run() -> Result<(), Box<Error>> {
|
|
290
|
290
|
let _ = gl_window.swap_buffers();
|
|
291
|
291
|
|
|
292
|
292
|
// Move glClear call out of the critical path.
|
|
293
|
|
- //TODO do not call glClear when drawing fills the whole screen anyway
|
|
294
|
|
- cx.clear_color((0.2, 0.2, 0.2, 1.0));
|
|
295
|
|
-
|
|
|
293
|
+ if !map.viewport_in_map() {
|
|
|
294
|
+ cx.clear_color((0.2, 0.2, 0.2, 1.0));
|
|
|
295
|
+ }
|
|
296
|
296
|
|
|
297
|
297
|
//TODO increase atlas size earlier to avoid excessive copying to the GPU
|
|
298
|
298
|
//TODO increase max tile cache size?
|