diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 7f7c9a6ea..eef1d6c13 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -1162,6 +1162,8 @@ void IrrDriver::update(float dt) if (inRace) { + irr_driver->getVideoDriver()->enableMaterial2D(); + RaceGUIBase *rg = world->getRaceGUI(); for(unsigned int i=0; i<world->getNumKarts(); i++) { @@ -1178,11 +1180,13 @@ void IrrDriver::update(float dt) World::getWorld()->getPhysics()->draw(); } // if kart->Camera } // for i<world->getNumKarts() + // To draw the race gui we set the viewport back to the full // screen. m_video_driver->setViewPort(core::recti(0, 0, UserConfigParams::m_width, UserConfigParams::m_height)); + for(unsigned int i=0; i<world->getNumKarts(); i++) { Kart *kart = world->getKart(i); diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index 47bed74dd..8a499f663 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -181,7 +181,6 @@ void RaceGUI::renderGlobal(float dt) KartIconDisplayInfo* info = world->getKartsDisplayInfo(); - irr_driver->getVideoDriver()->enableMaterial2D(); // seems like we need to remind irrlicht from time to time to use the Material2D drawGlobalPlayerIcons(info); } // renderGlobal @@ -235,11 +234,8 @@ void RaceGUI::renderPlayerView(const Kart *kart) RaceGUI::KartIconDisplayInfo* info = World::getWorld()->getKartsDisplayInfo(); - irr_driver->getVideoDriver()->enableMaterial2D(); // not sure why I need to call it again but with this, it works drawPowerupIcons (kart, viewport, scaling); - irr_driver->getVideoDriver()->enableMaterial2D(); drawSpeedAndEnergy (kart, viewport, scaling); - irr_driver->getVideoDriver()->enableMaterial2D(); drawRankLap (info, kart, viewport); RaceGUIBase::renderPlayerView(kart);