49 lines
705 B
C++
49 lines
705 B
C++
/*
|
|
* GuiRenderer.h
|
|
*
|
|
* Created on: Nov 13, 2016
|
|
* Author: tibi
|
|
*/
|
|
|
|
#ifndef GRAPHICS_GUIRENDERER_H_
|
|
#define GRAPHICS_GUIRENDERER_H_
|
|
|
|
#define GUIRENDERER_FPS_VALS 30
|
|
|
|
namespace farmlands {
|
|
|
|
// Forward declarations
|
|
struct GameState;
|
|
|
|
namespace graphics {
|
|
|
|
class GuiRenderer
|
|
{
|
|
public:
|
|
GuiRenderer();
|
|
virtual ~GuiRenderer();
|
|
|
|
/**
|
|
* Initializes game renderer
|
|
*/
|
|
void initialize(GameState* gameState);
|
|
|
|
/**
|
|
* Renders the GUI
|
|
*/
|
|
void render();
|
|
|
|
private:
|
|
void computeFps();
|
|
|
|
GameState* m_gameState;
|
|
float m_fpsVals[GUIRENDERER_FPS_VALS];
|
|
float m_fps;
|
|
int m_fpsIndex;
|
|
};
|
|
|
|
} /* namespace graphics */
|
|
} /* namespace farmlands */
|
|
|
|
#endif /* GRAPHICS_GUIRENDERER_H_ */
|