Fixed init of Group (actually should NOT init its children nodes).

Ensure Nodes deletetion is done.
This commit is contained in:
brunoherbelin
2020-04-13 11:48:06 +02:00
parent df6e2bbe63
commit 57fc66c546
8 changed files with 50 additions and 30 deletions

View File

@@ -12,6 +12,7 @@ class ImageSurface : public Primitive {
public:
ImageSurface(const std::string& path = "" );
~ImageSurface();
void init () override;
void draw (glm::mat4 modelview, glm::mat4 projection) override;
@@ -25,7 +26,7 @@ protected:
};
// Draw a Rectangle (triangle strip) with a media as animated texture
// Draw a Rectangle with a media as animated texture
class MediaPlayer;
class MediaSurface : public ImageSurface {
@@ -66,6 +67,7 @@ class Points : public Primitive {
public:
Points(std::vector<glm::vec3> points, glm::vec4 color, uint pointsize = 10);
~Points();
virtual void init() override;
virtual void draw(glm::mat4 modelview, glm::mat4 projection) override;
@@ -85,6 +87,7 @@ class LineStrip : public Primitive {
public:
LineStrip(std::vector<glm::vec3> points, glm::vec4 color, uint linewidth = 1);
~LineStrip();
virtual void init() override;
virtual void draw(glm::mat4 modelview, glm::mat4 projection) override;
@@ -97,6 +100,7 @@ public:
inline uint getLineWidth() const { return linewidth_; }
};
class LineSquare : public LineStrip {
void deleteGLBuffers_() override {}
@@ -108,6 +112,7 @@ public:
void accept(Visitor& v) override;
};
class LineCircle : public LineStrip {
void deleteGLBuffers_() override {}