summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-09-16 16:37:31 +0200
committerraysan5 <[email protected]>2020-09-16 16:37:31 +0200
commit6da3c1e7c3808e06efd110903222c2be8971e589 (patch)
treee00c785fc9963498a37700e73a25692ecac1377d
parentcbdb9bfe429c38754b4809aac60fa72bf1727d1d (diff)
downloadraylib-6da3c1e7c3808e06efd110903222c2be8971e589.tar.gz
raylib-6da3c1e7c3808e06efd110903222c2be8971e589.zip
Reverted previous change
-rw-r--r--examples/models/models_material_pbr.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/examples/models/models_material_pbr.c b/examples/models/models_material_pbr.c
index f6000aef..9c531ea5 100644
--- a/examples/models/models_material_pbr.c
+++ b/examples/models/models_material_pbr.c
@@ -53,7 +53,6 @@ int main(void)
// NOTE: New VBO for tangents is generated at default location and also binded to mesh VAO
MeshTangents(&model.meshes[0]);
- UnloadMaterial(model.materials[0]); // get rid of default material
model.materials[0] = LoadMaterialPBR((Color){ 255, 255, 255, 255 }, 1.0f, 1.0f);
// Create lights
@@ -102,18 +101,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
-
- // Shaders and textures must be unloaded by user,
- // they could be in use by other models
- UnloadTexture(model.materials[0].maps[MAP_ALBEDO].texture);
- UnloadTexture(model.materials[0].maps[MAP_NORMAL].texture);
- UnloadTexture(model.materials[0].maps[MAP_METALNESS].texture);
- UnloadTexture(model.materials[0].maps[MAP_ROUGHNESS].texture);
- UnloadTexture(model.materials[0].maps[MAP_OCCLUSION].texture);
- UnloadTexture(model.materials[0].maps[MAP_IRRADIANCE].texture);
- UnloadTexture(model.materials[0].maps[MAP_PREFILTER].texture);
- UnloadTexture(model.materials[0].maps[MAP_BRDF].texture);
- UnloadShader(model.materials[0].shader);
+ UnloadMaterial(model.materials[0]); // Unload material: shader and textures
UnloadModel(model); // Unload model