aboutsummaryrefslogtreecommitdiff
path: root/src/clientmap.cpp
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-11-04 10:51:40 -0500
committerPerttu Ahola <celeron55@gmail.com>2012-11-09 19:12:44 +0200
commit0dd9c14ff8b20b825da1b0f8bd9952702b19affb (patch)
tree504f635f955c0d14cc8ca13e0e5a0278746f2371 /src/clientmap.cpp
parent0709918bd82ab942445e12aca5bceb85c6ce05e0 (diff)
downloadminetest-0dd9c14ff8b20b825da1b0f8bd9952702b19affb.tar.gz
minetest-0dd9c14ff8b20b825da1b0f8bd9952702b19affb.tar.bz2
minetest-0dd9c14ff8b20b825da1b0f8bd9952702b19affb.zip
Added video settings filter options via config file - second try :-)
Set one or more of these in the config to turn the related option on: mip_map = 1 anisotropic_filter = 1 bilinear_filter = 1 trilinear_filter = 1
Diffstat (limited to 'src/clientmap.cpp')
-rw-r--r--src/clientmap.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/clientmap.cpp b/src/clientmap.cpp
index 64d5656d4..02c9fe9b1 100644
--- a/src/clientmap.cpp
+++ b/src/clientmap.cpp
@@ -413,6 +413,10 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
m_last_drawn_sectors.clear();
}
+ bool use_trilinear_filter = g_settings->getBool("trilinear_filter");
+ bool use_bilinear_filter = g_settings->getBool("bilinear_filter");
+ bool use_anisotropic_filter = g_settings->getBool("anisotropic_filter");
+
/*
Get time for measuring timeout.
@@ -544,6 +548,11 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
for(u32 i=0; i<c; i++)
{
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
+
+ buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
+ buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
+ buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
+
const video::SMaterial& material = buf->getMaterial();
video::IMaterialRenderer* rnd =
driver->getMaterialRenderer(material.MaterialType);