2016-09-15 15:23:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-09-25 21:05:27 +00:00
|
|
|
#include <math.h>
|
|
|
|
|
2016-09-15 15:23:02 +00:00
|
|
|
#include <epoxy/gl.h>
|
|
|
|
#include <epoxy/glx.h>
|
|
|
|
|
2016-10-02 09:00:03 +00:00
|
|
|
#include <glm/gtc/matrix_transform.hpp>
|
|
|
|
|
2016-09-28 01:33:01 +00:00
|
|
|
#include "game.hpp"
|
2016-09-27 15:57:41 +00:00
|
|
|
|
2016-09-25 21:05:27 +00:00
|
|
|
namespace endofthejedi {
|
|
|
|
|
2016-09-28 09:35:56 +00:00
|
|
|
/**
|
|
|
|
* Base class for the render.
|
|
|
|
*
|
|
|
|
* Implementations should render the whole scene (state) on the screen with
|
|
|
|
* opengl.
|
|
|
|
*/
|
|
|
|
class Renderer {
|
|
|
|
private:
|
|
|
|
protected:
|
|
|
|
public:
|
2016-09-28 09:42:50 +00:00
|
|
|
virtual void setup() { }
|
2016-09-28 09:35:56 +00:00
|
|
|
virtual void render(const game::State *state) = 0;
|
2016-10-02 09:00:03 +00:00
|
|
|
|
|
|
|
virtual void setWindowSize(int px, int py) { (void) px; (void) py; }
|
|
|
|
virtual void setCameraMatrix(const glm::mat4 &cam) { (void) cam; }
|
2016-09-28 09:35:56 +00:00
|
|
|
};
|
2016-09-28 05:03:29 +00:00
|
|
|
|
2016-09-25 21:05:27 +00:00
|
|
|
}
|