diff --git a/src/guiengine/CGUISpriteBank.cpp b/src/guiengine/CGUISpriteBank.cpp index 8c756453a..a80ca4409 100644 --- a/src/guiengine/CGUISpriteBank.cpp +++ b/src/guiengine/CGUISpriteBank.cpp @@ -9,6 +9,7 @@ #include "IVideoDriver.h" #include "ITexture.h" #include +#include "graphics/glwrap.hpp" namespace irr { @@ -217,7 +218,7 @@ void STKModifiedSpriteBank::draw2DSprite(u32 index, const video::SColor *const colors=0, bool useAlphaChannelOfTexture=false)=0 */ - Driver->draw2DImage(tex, dest, r /* source rect */, clip, + draw2DImage(tex, dest, r /* source rect */, clip, NULL /* colors */, true); } // draw2DSprite diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index 7c925bb32..e6b69ca59 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -1237,7 +1237,7 @@ namespace GUIEngine core::dimension2d(screen_size.Width, text_height) ); - Private::g_driver->draw2DRectangle(SColor(255,252,248,230), + GL32_draw2DRectangle(SColor(255,252,248,230), msgRect); Private::g_font->draw((*it).m_message.c_str(), msgRect, diff --git a/src/guiengine/skin.cpp b/src/guiengine/skin.cpp index d17128d39..4b80ce9f1 100644 --- a/src/guiengine/skin.cpp +++ b/src/guiengine/skin.cpp @@ -795,7 +795,7 @@ void Skin::drawProgress(Widget* w, const core::recti &rect, SkinConfig::m_render_params["progress::fill"], w->m_deactivated); #if 0 - GUIEngine::getDriver()->draw2DImage( + draw2DImage( SkinConfig::m_render_params["progress::fill"].getImage(), sized_rect, core::recti(0,0,progress->m_w, progress->m_h), 0 /* no clipping */, colors, true); diff --git a/src/guiengine/widgets/CGUIEditBox.cpp b/src/guiengine/widgets/CGUIEditBox.cpp index 5f852c194..f2688b3c2 100644 --- a/src/guiengine/widgets/CGUIEditBox.cpp +++ b/src/guiengine/widgets/CGUIEditBox.cpp @@ -12,6 +12,7 @@ //#include "os.h" #include "Keycodes.h" +#include "graphics/glwrap.hpp" #include "graphics/irr_driver.hpp" #include "utils/translation.hpp" #include "utils/time.hpp" @@ -937,7 +938,7 @@ void CGUIEditBox::draw() core::rect< s32 > caret_rect = CurrentTextRect; caret_rect.UpperLeftCorner.X += charcursorpos - 1; caret_rect.LowerRightCorner.X = caret_rect.UpperLeftCorner.X + 2; - irr_driver->getVideoDriver()->draw2DRectangle( video::SColor(255,0,0,0), caret_rect ); + GL32_draw2DRectangle( video::SColor(255,0,0,0), caret_rect ); /* font->draw(L"_", CurrentTextRect, diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index a20d5444e..0a51182c8 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -21,6 +21,7 @@ #include "audio/music_manager.hpp" #include "audio/sfx_base.hpp" #include "challenges/unlock_manager.hpp" +#include "graphics/glwrap.hpp" #include "graphics/material.hpp" #include "guiengine/engine.hpp" #include "guiengine/modaldialog.hpp" @@ -813,7 +814,7 @@ void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y, ri->m_kart_icon->getSize()); core::recti dest_rect(current_x, y, current_x+m_width_icon, y+m_width_icon); - irr_driver->getVideoDriver()->draw2DImage(ri->m_kart_icon, dest_rect, + draw2DImage(ri->m_kart_icon, dest_rect, source_rect, NULL, NULL, true); } @@ -921,12 +922,12 @@ void RaceResultGUI::displaySoccerResults() core::recti sourceRect(core::vector2di(0,0), redTeamIcon->getSize()); core::recti destRect(currX, currY, currX+redTeamIcon->getSize().Width/2, currY+redTeamIcon->getSize().Height/2); - irr_driver->getVideoDriver()->draw2DImage(redTeamIcon, destRect,sourceRect, + draw2DImage(redTeamIcon, destRect,sourceRect, NULL,NULL, true); currX += UserConfigParams::m_width/2 - redTeamIcon->getSize().Width/2; destRect = core::recti(currX, currY, currX+redTeamIcon->getSize().Width/2, currY+redTeamIcon->getSize().Height/2); - irr_driver->getVideoDriver()->draw2DImage(blueTeamIcon,destRect,sourceRect, + draw2DImage(blueTeamIcon,destRect,sourceRect, NULL, NULL, true); resultText = StringUtils::toWString(teamScore[1]); @@ -977,7 +978,7 @@ void RaceResultGUI::displaySoccerResults() sourceRect = core::recti(core::vector2di(0,0), scorerIcon->getSize()); irr::u32 offsetX = GUIEngine::getFont()->getDimension(resultText.c_str()).Width/2; destRect = core::recti(currX-offsetX-30, currY, currX-offsetX, currY+ 30); - irr_driver->getVideoDriver()->draw2DImage(scorerIcon, destRect, sourceRect, + draw2DImage(scorerIcon, destRect, sourceRect, NULL, NULL, true); } @@ -1009,7 +1010,7 @@ void RaceResultGUI::displaySoccerResults() irr::u32 offsetX = GUIEngine::getFont()->getDimension(resultText.c_str()).Width/2; destRect = core::recti(currX-offsetX-30, currY, currX-offsetX, currY+ 30); - irr_driver->getVideoDriver()->draw2DImage(scorerIcon, destRect, sourceRect, + draw2DImage(scorerIcon, destRect, sourceRect, NULL, NULL, true); } } @@ -1180,7 +1181,7 @@ void RaceResultGUI::displayHighScores() core::recti dest_rect(current_x, current_y, current_x+m_width_icon, current_y+m_width_icon); - irr_driver->getVideoDriver()->draw2DImage( + draw2DImage( kart_icon_texture, dest_rect, source_rect, NULL, NULL, true);