Advertisement
djhonga2001

GTA V FPS

Mar 14th, 2016
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. float fps = 0.0f;
  2. int frame = 0;
  3.  
  4. void displayFPS() //onTickFps
  5. {
  6. if (0 == frame)
  7. {
  8. frame = GAMEPLAY::GET_FRAME_COUNT();
  9. SYSTEM::SETTIMERB(0);
  10. }
  11. if (SYSTEM::TIMERB() >= 1000)
  12. {
  13. fps = GAMEPLAY::GET_FRAME_COUNT() - frame - 1;
  14. frame = 0;
  15. }
  16. UI::SET_TEXT_JUSTIFICATION(0);
  17. UI::SET_TEXT_OUTLINE();
  18. UI::_SET_TEXT_ENTRY("BMARK_FPS");
  19. UI::ADD_TEXT_COMPONENT_FLOAT(fps, 0);
  20. UI::_DRAW_TEXT(0.5, 0.9);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement