Closed planetis-m closed 1 year ago
Affected materials[].shader, materials[].maps[].texture, materials[].maps itself is freed!
MaterialMap has no destructor, so a "weak" not owning Texture will work fine. BUT Material has destructor and unloads Shader and maps Textures properly! But Model that aggregates all of them...
Fixed in a more elegant way than the rust bindings/
Model.meshes might be better modeled with WeakModel. But no example exists so who cares.
https://github.com/MisterPeModder/Bomberman-Global-Offensive/blob/dfef971b30d0ef82812cb951be7b273c910db35b/src/raylib/model/Model.cpp#L85 Uses a runtime flag instead. Seems from it's usage it always owns the mesh.
https://github.com/nullstare/ReiLua Seem to use shared meshes but mixes both variations! It's def incorrect.
No, this is done better as a runtime check and for that to work unloadModelWithoutMesh needs to be available.
loadModelFromMesh always sinks the parameter, it could take a bool value.
From rmodels UnloadModel: