summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_skybox.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2019-08-26 21:19:04 +0200
committerraysan5 <[email protected]>2019-08-26 21:19:04 +0200
commit37a6f120377e28d5499f130ff346848a3983bee8 (patch)
treee2b01adb9de0326c34c7776a5c742d1c3725c8dd /examples/models/models_skybox.c
parentaddbd88833ffc9a2bd1fe33a83e683245324abd0 (diff)
downloadraylib-37a6f120377e28d5499f130ff346848a3983bee8.tar.gz
raylib-37a6f120377e28d5499f130ff346848a3983bee8.zip
Unload model shaders and textures
They are not automatically unloaded when unloading the model!
Diffstat (limited to 'examples/models/models_skybox.c')
-rw-r--r--examples/models/models_skybox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c
index bad29b96..c2849032 100644
--- a/examples/models/models_skybox.c
+++ b/examples/models/models_skybox.c
@@ -89,7 +89,10 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
- UnloadModel(skybox); // Unload skybox model (and textures)
+ UnloadShader(skybox.materials[0].shader);
+ UnloadTexture(skybox.materials[0].maps[MAP_CUBEMAP].texture);
+
+ UnloadModel(skybox); // Unload skybox model
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------