33 lines
561 B
C++
33 lines
561 B
C++
#ifndef WC3RE_RENDER_RENDERER_HH__
|
|
#define WC3RE_RENDER_RENDERER_HH__
|
|
|
|
#include "sdlutil.hh"
|
|
|
|
namespace game {
|
|
class GameState;
|
|
}
|
|
|
|
namespace render {
|
|
class Renderer {
|
|
public:
|
|
Renderer();
|
|
|
|
void run();
|
|
|
|
int getWidth() const;
|
|
int getHeight() const;
|
|
|
|
void pushGS(std::unique_ptr<game::GameState> gs);
|
|
std::unique_ptr<game::GameState> popGS();
|
|
private:
|
|
SDLInit sdlInit_;
|
|
SDLWindowUPtr window_;
|
|
SDLGLContext context_;
|
|
std::vector<std::unique_ptr<game::GameState> > gamestates_;
|
|
int width_, height_;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|