diff --git a/doc/changelog.dox b/doc/changelog.dox index 0012a599b..5654acdf3 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -1035,6 +1035,8 @@ See also: @ref GL::Buffer::bind() call as affecting also the regular binding point, leading to wrong buffer object being used for data upload etc. in certain cases on platforms without DSA extensions. +- A large refactor of @ref GL::Mesh internals caused VAOs to no longer be + correctly deleted on destruction (see [mosra/magnum#632](https://github.com/mosra/magnum/issues/632)) - @ref GL::Context move constructor was not marked @cpp noexcept @ce by accident and it was also not really moving everything properly, especially when delayed creation was done on the moved-to object diff --git a/src/Magnum/GL/Mesh.cpp b/src/Magnum/GL/Mesh.cpp index 839a5d5b1..5d746a95c 100644 --- a/src/Magnum/GL/Mesh.cpp +++ b/src/Magnum/GL/Mesh.cpp @@ -344,6 +344,8 @@ Mesh::~Mesh() { /* Remove current vao from the state */ GLuint& current = Context::current().state().mesh.currentVAO; if(current == _id) current = 0; + + Context::current().state().mesh.destroyImplementation(*this); } Mesh::Mesh(Mesh&& other) noexcept: _id(other._id), _primitive(other._primitive), _flags{other._flags}, _countSet{other._countSet}, _count(other._count), _baseVertex{other._baseVertex}, _instanceCount{other._instanceCount},