diff options
Diffstat (limited to 'src/render/render.cc')
-rw-r--r-- | src/render/render.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/render/render.cc b/src/render/render.cc index 5a6c6bc..acc9c86 100644 --- a/src/render/render.cc +++ b/src/render/render.cc @@ -21,6 +21,7 @@ #include "render/dust.h" #include "render/render.h" #include "render/screenshot.h" +#include "render/sky.h" #include "render/textures.h" #include "sys/sys.h" @@ -150,14 +151,8 @@ void init(int width, int height) // unload game assets (zone change) void unload() { - // clear zone sky textures - for (core::Zone::Registry::iterator it = core::Zone::registry().begin(); it != core::Zone::registry().end(); it++) { - core::Zone *zone = (*it).second; - if (zone->sky_texture()) { - render::Textures::unload(zone->sky_texture()); - zone->set_sky_texture(0); - } - } + // unload skybox + Sky::unload(); for (core::Entity::Registry::iterator it = core::Entity::registry().begin(); it != core::Entity::registry().end(); it++) { core:: Entity *entity = (*it).second; @@ -179,12 +174,9 @@ void unload() // clear all assets void clear() { - // clear zone sky textures - for (core::Zone::Registry::iterator it = core::Zone::registry().begin(); it != core::Zone::registry().end(); it++) { - core::Zone *zone = (*it).second; - zone->set_sky_texture(0); - } - + // unload skybox + Sky::unload(); + // clear entity models, and globe textures, this will force a reload for (core::Entity::Registry::iterator it = core::Entity::registry().begin(); it != core::Entity::registry().end(); it++) { core::Entity *entity = (*it).second; |