Closed Crydsch closed 3 years ago
I just found this function in model.h
, so there its taken care of, but i guess it should be in rlgl.h
.
// Unload mesh from memory (RAM and/or VRAM)
void UnloadMesh(Mesh mesh)
{
rlUnloadMesh(mesh);
RL_FREE(mesh.vboId);
}
Reviewed on latest commit, now every module (rlgl
, models
) takes care of the corresponding loaded data. models
takes care of loading/unloading vertex data and rlgl
takes cares of OpenGL related data.
In
models.h
allGenMesh*
methods allocate memory formesh.vboId
. But inrlgl.h
in the methodrlUnloadMesh()
there is noRL_FREE(mesh.vboId)
.