|
|
@ -2727,18 +2727,18 @@ void rlDrawMesh(Mesh mesh, Material material, Matrix transform) |
|
|
|
// Unload mesh data from CPU and GPU |
|
|
|
void rlUnloadMesh(Mesh *mesh) |
|
|
|
{ |
|
|
|
k">if (mesh->vertices != NULL) free(mesh->vertices); |
|
|
|
k">if (mesh->texcoords != NULL) free(mesh->texcoords); |
|
|
|
k">if (mesh->normals != NULL) free(mesh->normals); |
|
|
|
k">if (mesh->colors != NULL) free(mesh->colors); |
|
|
|
k">if (mesh->tangents != NULL) free(mesh->tangents); |
|
|
|
k">if (mesh->texcoords2 != NULL) free(mesh->texcoords2); |
|
|
|
k">if (mesh->indices != NULL) free(mesh->indices); |
|
|
|
|
|
|
|
k">if (mesh->baseVertices != NULL) free(mesh->baseVertices); |
|
|
|
k">if (mesh->baseNormals != NULL) free(mesh->baseNormals); |
|
|
|
k">if (mesh->weightBias != NULL) free(mesh->weightBias); |
|
|
|
k">if (mesh->weightId != NULL) free(mesh->weightId); |
|
|
|
free(mesh->vertices); |
|
|
|
free(mesh->texcoords); |
|
|
|
free(mesh->normals); |
|
|
|
free(mesh->colors); |
|
|
|
free(mesh->tangents); |
|
|
|
free(mesh->texcoords2); |
|
|
|
free(mesh->indices); |
|
|
|
|
|
|
|
free(mesh->baseVertices); |
|
|
|
free(mesh->baseNormals); |
|
|
|
free(mesh->weightBias); |
|
|
|
free(mesh->weightId); |
|
|
|
|
|
|
|
rlDeleteBuffers(mesh->vboId[0]); // vertex |
|
|
|
rlDeleteBuffers(mesh->vboId[1]); // texcoords |
|
|
|