Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderext.cc')
-rw-r--r--src/render/renderext.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/render/renderext.cc b/src/render/renderext.cc
index 049b3de..8ec31bf 100644
--- a/src/render/renderext.cc
+++ b/src/render/renderext.cc
@@ -82,12 +82,17 @@ RenderExt::RenderExt(core::Entity *entity) : core::Extension(core::Extension::Re
core::EntityGlobe *globe = static_cast<core::EntityGlobe *>(entity);
// load globe textures
- if (!globe->render_texture && globe->texture().size()) {
- std::stringstream texname;
- texname << "textures/" << globe->texture();
- globe->render_texture = Textures::load(texname.str());
- if (!globe->render_texture)
- globe->entity_texture.clear();
+ if (!globe->texture_id() && globe->texturename().size()) {
+ globe->set_texture_id(Textures::load("textures/" + globe->texturename()));
+ if (!globe->texture_id())
+ globe->set_texturename("");
+ }
+
+ if (!globe->corona_id() && globe->coronaname().size()) {
+ globe->set_corona_id(Textures::bind("textures/corona/" + globe->coronaname()));
+ if (!globe->corona_id()) {
+ globe->set_coronaname("");
+ }
}
}
}