fixed much stuff with bad usage of constructor mixed with virtual functions in gl stuff. added model loading with assimp.

This commit is contained in:
Andreas Ortmann 2016-09-28 13:00:40 +02:00
parent aedda9d48e
commit 0105bfe430
17 changed files with 402 additions and 175 deletions

View file

@ -1,6 +1,15 @@
#include "renderer_polygon_2d.hpp"
namespace endofthejedi {
void RendererPolygon2d::setup()
{
// (dark grey) bg
float r = 0.1;
float g = 0.1;
float b = 0.1;
glClearColor(r, g, b, 1.0);
}
void RendererPolygon2d::drawCircle(float x, float y, float radius,
float r, float g, float b,
int numSides) {

View file

@ -15,7 +15,7 @@
namespace endofthejedi {
class RendererPolygon2d : Renderer {
class RendererPolygon2d : public Renderer {
private:
void drawCircle(float x, float y, float radius, float r, float g,
float b, int numSides = 12);
@ -27,7 +27,9 @@ namespace endofthejedi {
void drawExplosion(const game::Explosion *explosion);
protected:
public:
void setup() override;
void render(const game::State *state) override;
};