Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
frame.cpp File Reference
#include <algorithm>
#include "inexor/engine/frame.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/ui/legacy/menus.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"

Macros

#define MAXFPSHISTORY   60
 frames per seconds and timing More...
 

Functions

 VAR (menufps, 0, 60, 1000)
 
 VARP (maxfps, 0, 200, 1000)
 
int get_current_max_fps ()
 The current fps limit. More...
 
void resetfpshistory ()
 clear fps history array More...
 
void updatefpshistory (int millis)
 add current frames per seconds score to fps history array More...
 
void getfps (int &fps, int &bestdiff, int &worstdiff)
 get average fps, best fps and worst fps (see command fpsrange) More...
 
void getfps_ (int *raw)
 cubescript: get fps as float More...
 
 COMMANDN (getfps, getfps_,"i")
 

Variables

int fpspos = 0
 
int fpshistory [MAXFPSHISTORY]
 
bool inbetweenframes = false
 
bool renderedframe = true
 

Macro Definition Documentation

#define MAXFPSHISTORY   60

frames per seconds and timing

store the last MAXFPSHISTORY fps rates

Referenced by getfps(), getfps_(), resetfpshistory(), and updatefpshistory().

Function Documentation

COMMANDN ( getfps  ,
getfps_  ,
"i"   
)
int get_current_max_fps ( )
void getfps ( int &  fps,
int &  bestdiff,
int &  worstdiff 
)

get average fps, best fps and worst fps (see command fpsrange)

References fpshistory, loopi(), and MAXFPSHISTORY.

Referenced by getfps_(), gl_drawhud(), and recorder::start().

void getfps_ ( int *  raw)

cubescript: get fps as float

See Also
floatret

References f(), floatret(), fpshistory, fpspos, getfps(), intret(), and MAXFPSHISTORY.

void resetfpshistory ( )

clear fps history array

References fpshistory, fpspos, loopi(), and MAXFPSHISTORY.

Referenced by main().

void updatefpshistory ( int  millis)

add current frames per seconds score to fps history array

References fpshistory, fpspos, inexor::rpc::max(), MAXFPSHISTORY, and inexor::rpc::min().

Referenced by main().

VAR ( menufps  ,
,
60  ,
1000   
)
VARP ( maxfps  ,
,
200  ,
1000   
)

Variable Documentation

int fpshistory[MAXFPSHISTORY]
int fpspos = 0
bool inbetweenframes = false
bool renderedframe = true