KlassischeKeplerKriege/game/renderer.hpp

32 lines
663 B
C++
Raw Normal View History

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>
#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 {
/**
* 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() { }
virtual void render(const game::State *state) = 0;
virtual void setWindowSize(int px, int py) { (void) px; (void) py; }
virtual void setCameraMatrix(const glm::mat4 &cam) { (void) cam; }
};
2016-09-28 05:03:29 +00:00
2016-09-25 21:05:27 +00:00
}