projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3856fcd
)
[OpenTK] Implemented GameWindow.UpdateTime and RenderTime properties
author
thefiddler
<stapostol@gmail.com>
Tue, 7 Jan 2014 08:09:43 +0000
(09:09 +0100)
committer
thefiddler
<stapostol@gmail.com>
Tue, 7 Jan 2014 08:09:43 +0000
(09:09 +0100)
Source/OpenTK/GameWindow.cs
patch
|
blob
|
history
diff --git
a/Source/OpenTK/GameWindow.cs
b/Source/OpenTK/GameWindow.cs
index
048d5f6
..
3669970
100644
(file)
--- a/
Source/OpenTK/GameWindow.cs
+++ b/
Source/OpenTK/GameWindow.cs
@@
-446,6
+446,7
@@
namespace OpenTK
update_timestamp = timestamp;
}
timestamp = watch.Elapsed.TotalSeconds;
+ update_time = timestamp - update_timestamp;
} while (next_update <= 0 && ++frameskip < max_frameskip);
double render_elapsed = MathHelper.Clamp(timestamp - render_timestamp, 0.0, 1.0);
@@
-453,6
+454,8
@@
namespace OpenTK
{
render_timestamp = timestamp;
}
+ timestamp = watch.Elapsed.TotalSeconds;
+ render_time = timestamp - render_timestamp;
}
bool RaiseUpdateFrame(double time, ref double next_update)