diff options
| author | raysan5 <raysan5@gmail.com> | 2016-03-27 18:33:30 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-03-27 18:34:05 +0200 |
| commit | 956a6e6f7713a19e746497efb9e909ba88be9c3d (patch) | |
| tree | 83eaaa6bc2c716a0739102cac0e566bf79f283d1 /src/models.c | |
| parent | 8b7ca8b670a0f338fef85125311522833b945bf7 (diff) | |
| download | raylib-956a6e6f7713a19e746497efb9e909ba88be9c3d.tar.gz raylib-956a6e6f7713a19e746497efb9e909ba88be9c3d.zip | |
Corrected bug and comments on model unloading
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/models.c b/src/models.c index a1590424..52c68f9b 100644 --- a/src/models.c +++ b/src/models.c @@ -608,6 +608,8 @@ void UnloadModel(Model model) //if (model.mesh.texcoords2 != NULL) free(model.mesh.texcoords2); // Not used //if (model.mesh.tangents != NULL) free(model.mesh.tangents); // Not used + TraceLog(INFO, "Unloaded model data from RAM (CPU)"); + rlDeleteBuffers(model.mesh.vboId[0]); // vertex rlDeleteBuffers(model.mesh.vboId[1]); // texcoords rlDeleteBuffers(model.mesh.vboId[2]); // normals @@ -616,9 +618,6 @@ void UnloadModel(Model model) //rlDeleteBuffers(model.mesh.vboId[5]); // colors (NOT USED) rlDeleteVertexArrays(model.mesh.vaoId); - - if (model.mesh.vaoId > 0) TraceLog(INFO, "[VAO ID %i] Unloaded model data from VRAM (GPU)", model.mesh.vaoId); - else TraceLog(INFO, "[VBO ID %i][VBO ID %i][VBO ID %i] Unloaded model data from VRAM (GPU)", model.mesh.vboId[0], model.mesh.vboId[1], model.mesh.vboId[2]); } // Link a texture to a model |
