KlassischeKeplerKriege/game/renderer_polygon_2d/renderer_polygon_2d.hpp

36 lines
944 B
C++

#pragma once
#include "renderer.hpp"
#include "glclasses.hpp"
#include "game.hpp"
#include "state/trace.hpp"
#include "state/object.hpp"
#include "state/missile.hpp"
#include "state/player.hpp"
#include "state/planet.hpp"
#include "state/ship.hpp"
#include "state/explosion.hpp"
namespace endofthejedi {
class RendererPolygon2d : public Renderer {
private:
void drawCircle(float x, float y, float radius, float r, float g,
float b, int numSides = 12);
void drawShip(const glm::vec2 &pos, float radius);
void drawPlanet(const glm::vec2 &pos, float radius);
void drawMissile(const glm::vec2 &pos);
void drawTrace(const game::Trace *trace);
void drawExplosion(const game::Explosion *explosion);
protected:
public:
void setup() override;
void render(const game::State *state) override;
};
}