From bdcb16e7bbbc216ad70686047e7fa5fee4e70fd0 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 22 Sep 2019 21:47:19 +0200 Subject: Review PR and comments --- examples/models/models_material_pbr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/models') diff --git a/examples/models/models_material_pbr.c b/examples/models/models_material_pbr.c index 2c0a15e3..0da74140 100644 --- a/examples/models/models_material_pbr.c +++ b/examples/models/models_material_pbr.c @@ -100,9 +100,8 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - // user must unload shaders and textures as they could be in use - // by other models.... - UnloadShader(model.materials[0].shader); + // 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); @@ -111,6 +110,7 @@ int main(void) 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); UnloadModel(model); // Unload model -- cgit v1.2.3