• How to show the framerate in a GUI
    5 replies, posted
Hi, I am making a info GUI so I need to know how to do make it show up and update.
[code]draw.DrawText(FrameTime(),"ScoreboardText",0,0,color_black,0)[/code] Draws it in the upper left hand corner of your screen, for example.
Thanks so much
FrameTime returns the time it took to render the last frame, which is usually ~0.0001. To get the frame[b]rate[/b], do something like this.. [lua]local framerate = 1 / FrameTime( );[/lua]
[QUOTE=Nevec;17531701]usually ~0.0001.[/QUOTE] You get 1,000 fps? :O
[QUOTE=Jo The Shmo;17539182]You get 1,000 fps? :O[/QUOTE] Fps is a [b]none linear[/b] measurement so I doubt it.
Sorry, you need to Log In to post a reply to this thread.