Merge pull request #10 from matklad/expose-fps

add function to get framerate
This commit is contained in:
Joonas Javanainen 2015-10-17 22:37:10 +03:00
commit 96e29c8db8

View File

@ -223,6 +223,7 @@ impl ImGui {
}
pub fn get_time(&self) -> f32 { unsafe { imgui_sys::igGetTime() } }
pub fn get_frame_count(&self) -> i32 { unsafe { imgui_sys::igGetFrameCount() } }
pub fn get_frame_rate(&self) -> f32 { self.io().framerate }
pub fn frame<'ui, 'a: 'ui>(&'a mut self, width: u32, height: u32, delta_time: f32) -> Ui<'ui> {
{
let io = self.io_mut();