Fix drawable segment VAO leak (#1212)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mwilsnd
2023-06-06 16:32:02 -05:00
committed by Bart Louwers
parent 00d6bdd2ae
commit 199145784f
2 changed files with 4 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ struct Drawable::DrawSegment {
: mode(mode_),
segment(std::move(segment_)) {}
virtual ~DrawSegment() = default;
const gfx::DrawMode& getMode() const { return mode; }
Segment<void>& getSegment() { return segment; }

View File

@@ -53,6 +53,8 @@ struct DrawableGL::DrawSegmentGL final : public gfx::Drawable::DrawSegment {
: gfx::Drawable::DrawSegment(mode_, std::move(segment_)),
vertexArray(std::move(vertexArray_)) {}
~DrawSegmentGL() override = default;
const VertexArray& getVertexArray() const { return vertexArray; }
void setVertexArray(VertexArray&& value) { vertexArray = std::move(value); }