context reinit support

This commit is contained in:
2022-10-13 08:57:27 +03:00
parent 3b0d1ea0e2
commit ce3df7d051
24 changed files with 136 additions and 24 deletions

View File

@@ -64,6 +64,16 @@ void Mesh::init(QOpenGLExtraFunctions * f) {
}
void Mesh::reinit() {
buffer_geom.reinit();
buffer_ind .reinit();
QMapIterator<int, VertexObject * > it(vao_map);
while (it.hasNext())
it.next().value()->reinit();
changed = true;
}
void Mesh::destroy(QOpenGLExtraFunctions * f) {
buffer_geom.destroy(f);
buffer_ind .destroy(f);