17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 09:27:54 +01:00

fix: a deleted model is no longer the picked node, an orthophoto tile isn't swept as a grey stub, the ED brake arrays freed

Deleting a model in the editor left the renderer holding it as the picked node, the next pick used freed memory: the renderer forgets it now (Forget_Node). A texture filled straight from memory (internalsrc:) can't be read again, released by the garbage sweep it came back grey; it stays now, and the units bound with the old name are rebound. The arrays of the ED brake force sharing are vectors, they leaked once per update. The scene hierarchy and the editor menu items go through the translation. Python caches ignored.
This commit is contained in:
maj00r
2026-11-03 21:45:58 +01:00
parent 0d69059448
commit e230d7b902
10 changed files with 47 additions and 17 deletions

View File

@@ -706,6 +706,16 @@ void opengl_texture::update_from_memory(size_t width, size_t height, const uint8
if (glGenerateMipmap)
glGenerateMipmap(target);
glFlush();
// the content given straight to the gpu can't be read again: released by the garbage sweep, the texture would come back as
// the grey stub
if (type == "internalsrc:")
{
is_static = true;
is_ready = true;
}
// the name may be a new one, and the unit active took the texture past the unit cache
for (auto &unit : units)
unit = -1;
}
void