From 0dd9c14ff8b20b825da1b0f8bd9952702b19affb Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 4 Nov 2012 10:51:40 -0500 Subject: 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 --- src/clientmap.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/clientmap.cpp') 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; igetMeshBuffer(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); -- cgit v1.2.3