Rendering player and tiles now works.
This commit is contained in:
48
src/graphics/GuiRenderer.h
Normal file
48
src/graphics/GuiRenderer.h
Normal 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_ */
|
Reference in New Issue
Block a user