From d17714939e7ec740d0f198cdb14dec29ec0b6ac7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 18 May 2002 08:35:09 +0000 Subject: [PATCH] Modified the setting of min and mag texture filter modes to produce higher quality mip maps. --- src/osgPlugins/flt/ReaderWriterATTR.cpp | 28 ++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/osgPlugins/flt/ReaderWriterATTR.cpp b/src/osgPlugins/flt/ReaderWriterATTR.cpp index 0a1265f32..cac05bfd9 100644 --- a/src/osgPlugins/flt/ReaderWriterATTR.cpp +++ b/src/osgPlugins/flt/ReaderWriterATTR.cpp @@ -613,20 +613,24 @@ StateSet* Attr::createOsgStateSet() osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_NEAREST); break; case MIN_FILTER_MIPMAP_LINEAR: - case MIN_FILTER_MIPMAP_BILINEAR: - case MIN_FILTER_MIPMAP_TRILINEAR: osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::NEAREST_MIPMAP_LINEAR); break; - -// case MIN_FILTER_POINT: -// case MIN_FILTER_BILINEAR: -// case MIN_FILTER_BICUBIC; -// case MIN_FILTER_BILINEAR_GEQUAL: -// case MIN_FILTER_BILINEAR_LEQUAL: -// case MIN_FILTER_BICUBIC_GEQUAL: -// case MIN_FILTER_BICUBIC_LEQUAL: -// osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_LINEAR); -// break; + case MIN_FILTER_MIPMAP_BILINEAR: + osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_NEAREST); + break; + case MIN_FILTER_MIPMAP_TRILINEAR: + osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_LINEAR); + break; + case MIN_FILTER_POINT: + case MIN_FILTER_BILINEAR: + case MIN_FILTER_BICUBIC: +// case MIN_FILTER_BILINEAR_GEQUAL: + case MIN_FILTER_BILINEAR_LEQUAL: + case MIN_FILTER_BICUBIC_GEQUAL: + case MIN_FILTER_BICUBIC_LEQUAL: + default: + osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_LINEAR); + break; }