diff options
| author | Juan Linietsky | 2015-04-14 22:05:14 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-04-14 22:05:14 -0300 |
| commit | 3b434eacde58450965708c3eafb6b22eb2a99361 (patch) | |
| tree | 598b4b1941f843de55cb2c5ad198e4b29ad7d3bf /main/main.cpp | |
| parent | 28304bc3309eaf5d8319048de59ebf51168e24df (diff) | |
| download | godot-3b434eacde58450965708c3eafb6b22eb2a99361.tar.gz godot-3b434eacde58450965708c3eafb6b22eb2a99361.tar.zst godot-3b434eacde58450965708c3eafb6b22eb2a99361.zip | |
Fix clipping when used in viewport or inside another viewport, fixes #1661
Diffstat (limited to '')
| -rw-r--r-- | main/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp index 517ccaec0..dcf3c6f8d 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1293,12 +1293,15 @@ bool Main::iteration() { uint64_t ticks=OS::get_singleton()->get_ticks_usec(); uint64_t ticks_elapsed=ticks-last_ticks; + double step=(double)ticks_elapsed / 1000000.0; + float frame_slice=1.0/OS::get_singleton()->get_iterations_per_second(); + + //if (time_accum+step < frame_slice) + // return false; + frame+=ticks_elapsed; last_ticks=ticks; - double step=(double)ticks_elapsed / 1000000.0; - - float frame_slice=1.0/OS::get_singleton()->get_iterations_per_second(); if (step>frame_slice*8) step=frame_slice*8; @@ -1309,7 +1312,6 @@ bool Main::iteration() { bool exit=false; - int iters = 0; while(time_accum>frame_slice) { |
