diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/mapwidget.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/mapwidget.cc b/src/client/mapwidget.cc index 770abb2..52fe074 100644 --- a/src/client/mapwidget.cc +++ b/src/client/mapwidget.cc @@ -153,8 +153,11 @@ void MapWidget::draw() if (globe->has_flag(core::Entity::Bright)) { - // load globe corona texture + gl::end(); + + // load globe corona texture if (!globe->corona_id() && globe->coronaname().size()) { + globe->set_corona_id(render::Textures::load("textures/" + globe->coronaname())); if (!globe->corona_id()) { globe->set_coronaname(""); @@ -163,8 +166,6 @@ void MapWidget::draw() // draw corona if (globe->corona_id()) { - gl::end(); - texture_current = render::Textures::bind(globe->corona_id()); gl::begin(gl::Quads); @@ -180,14 +181,16 @@ void MapWidget::draw() glTexCoord2f(0.0f, 1.0f); gl::vertex(icon_location.x() - r * 2.0f, icon_location.y() + r * 2.0f); + gl::end(); } // bind bright globe icon texture if (texture_current != texture_bright) { - gl::end(); texture_current = render::Textures::bind(texture_bright); - gl::begin(gl::Quads); } + + gl::begin(gl::Quads); + } else { // bind globe icon texture |