diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-06 12:11:46 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-06 12:11:46 +0000 |
commit | 64a2a6d71023ab382c996ccdb8e403660fa19916 (patch) | |
tree | ab6a181c528deda6033ffa9c274ea87bfffffee1 /src/render/render.cc | |
parent | fed29d9ddc3b8372b9c3fe8bffe221a5a55e5ce9 (diff) |
replaces skydomes with skyboxes
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; |