Ogre Version: 3.0.0
Operating System: Windows 7 x64
Render System: Direct3D 11
I've been running into an issue for a while now - thought I'd fixed it a couple times before, but I just can't seem to work it out or find any obvious info on forums or otherwise.
What is the 'proper' way to reload/rebuild meshes at runtime? I'm building a game engine and all meshes are stored in custom data formats, with the engine creating meshes/submeshes and VAOs manually. When loading for the first time, this appears to work fine - but when unloading or reloading, I end up getting exceptions during render where the VAOs are still being referenced after having been deleted.
Reloading in this case, for reference, involves retrieving the existing mesh if one exists, then destroying any submeshes, then loading again the same as if it were a new mesh. Additionally, mesh loading/unloading is setup to only ever happen before rendering, so it seems to me like it should all be cleaned up and ready to go by the time the frame is rendered. The one other potential clue I have is that these are meshes that are already in use and attached to scene nodes, but I would think this would still work given that existing meshes are reused if they already exist and have their submeshes recreated - but maybe I'm wrong on that part.
I assume there's some simple step of some sort that I'm just missing - would appreciate any pointers!