Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-11 09:37:23 +0000
committerStijn Buys <ingar@osirion.org>2008-10-11 09:37:23 +0000
commit0d831968949b1119db48530a86c2d1651c6cbfc6 (patch)
tree925e02481149fa8ac227017af74818176b166a41 /src/render/render.cc
parent02fcd22d8cde355aa898a8c6bb4773d9434b8e9a (diff)
zonechange events, menu previous command
Diffstat (limited to 'src/render/render.cc')
-rw-r--r--src/render/render.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/render/render.cc b/src/render/render.cc
index f018510..3ba7e92 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -115,6 +115,30 @@ void clear()
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);
+ }
+ }
+
+ for (core::Entity::Registry::iterator it = core::Entity::registry().begin(); it != core::Entity::registry().end(); it++) {
+ core:: Entity *entity = (*it).second;
+
+ if (entity->type() == core::Entity::Globe) {
+ core::EntityGlobe *globe = static_cast<core::EntityGlobe *>(entity);
+ if (globe->render_texture) {
+ render::Textures::unload(globe->render_texture);
+ globe->render_texture = 0;
+ }
+ }
+ }
+}
+
+void reset()
+{
clear();
Textures::shutdown();
@@ -128,6 +152,7 @@ void unload()
vertexarray = new VertexArray(mb);
}
+
void shutdown()
{
con_print << "^BShutting down renderer..." << std::endl;