diff options
author | Aaron Suen <warr1024@gmail.com> | 2015-03-09 09:32:11 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-04-01 00:01:05 -0400 |
commit | 6d61375cc72bad5c569d25c253adca4e3701dd27 (patch) | |
tree | 790accab0443ebcff77790da83a306d713045b01 /src/drawscene.cpp | |
parent | b4247dff2e003dd8c5ea5a1f3ae349d0bfab90bc (diff) | |
download | minetest-6d61375cc72bad5c569d25c253adca4e3701dd27.tar.gz minetest-6d61375cc72bad5c569d25c253adca4e3701dd27.tar.bz2 minetest-6d61375cc72bad5c569d25c253adca4e3701dd27.zip |
Clean scaling pre-filter for formspec/HUD.
Diffstat (limited to 'src/drawscene.cpp')
-rw-r--r-- | src/drawscene.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/drawscene.cpp b/src/drawscene.cpp index b089e71e6..c3c3b2ef2 100644 --- a/src/drawscene.cpp +++ b/src/drawscene.cpp @@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "clientmap.h" #include "util/timetaker.h" #include "fontengine.h" +#include "guiscalingfilter.h" typedef enum { LEFT = -1, @@ -324,19 +325,19 @@ void draw_sidebyside_3d_mode(Camera& camera, bool show_hud, //makeColorKeyTexture mirrors texture so we do it twice to get it right again driver->makeColorKeyTexture(hudtexture, irr::video::SColor(255, 0, 0, 0)); - driver->draw2DImage(left_image, + draw2DImageFilterScaled(driver, left_image, irr::core::rect<s32>(0, 0, screensize.X/2, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(0, 0, screensize.X/2, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); - driver->draw2DImage(right_image, + draw2DImageFilterScaled(driver, right_image, irr::core::rect<s32>(screensize.X/2, 0, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(screensize.X/2, 0, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); @@ -380,19 +381,19 @@ void draw_top_bottom_3d_mode(Camera& camera, bool show_hud, //makeColorKeyTexture mirrors texture so we do it twice to get it right again driver->makeColorKeyTexture(hudtexture, irr::video::SColor(255, 0, 0, 0)); - driver->draw2DImage(left_image, + draw2DImageFilterScaled(driver, left_image, irr::core::rect<s32>(0, 0, screensize.X, screensize.Y/2), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(0, 0, screensize.X, screensize.Y/2), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); - driver->draw2DImage(right_image, + draw2DImageFilterScaled(driver, right_image, irr::core::rect<s32>(0, screensize.Y/2, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(0, screensize.Y/2, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); |