Rendering player and tiles now works.

This commit is contained in:
2016-11-27 13:53:18 +02:00
parent 914ae0de0d
commit 8173937797
35 changed files with 1160 additions and 230 deletions

View File

@ -0,0 +1,48 @@
/*
* 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_ */