KlassischeKeplerKriege/game/renderer_polygon_3d/renderer_polygon_3d.hpp

44 lines
1.1 KiB
C++
Raw Normal View History

2016-09-28 09:50:35 +00:00
#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"
class PolygonModel;
2016-09-28 09:50:35 +00:00
namespace endofthejedi {
class RendererPolygon3d : public Renderer {
2016-09-28 09:50:35 +00:00
public:
void setup();
void render(const game::State *state) override;
private:
void renderPlanets(const game::State *state);
void renderMissiles(const game::State *state);
2016-09-28 12:41:15 +00:00
void renderShips(const game::State *state);
void addModel(const std::string &filename, PolygonModel **dest);
private:
2016-09-28 11:36:22 +00:00
// all models are also here (for easy reloading etc.)
std::vector<PolygonModel*> m_models;
// and with a specific variable name here
PolygonModel *m_missileModel;
PolygonModel *m_planetModel;
2016-09-28 12:41:15 +00:00
PolygonModel *m_shipModel;
2016-09-28 11:36:22 +00:00
// for rendering everything
Shader m_shader;
};
2016-09-28 09:50:35 +00:00
}