Changed the support for anisotropic filtering in osg::Texture so that it
is now controlled via the setMaxAnisotropy(float) method, and is set up independently for the mag filter mode, which it previously was done.
This commit is contained in:
@@ -180,8 +180,10 @@ osg::Node* createLayer(const osg::Vec3& offset,osg::Image* image,osg::Node* geom
|
||||
|
||||
// set up anistropic filtering.
|
||||
texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR_MIPMAP_LINEAR);
|
||||
texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::ANISOTROPIC);
|
||||
texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR);
|
||||
|
||||
texture->setMaxAnisotropy(2.0f);
|
||||
|
||||
// add the transform node to root group node.
|
||||
top_transform->addChild(createTexturedItem(local_offset,texture,geometry));
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ class TextureCallback : public osg::NodeCallback
|
||||
_filterRange.push_back(osg::Texture::NEAREST);
|
||||
_filterRange.push_back(osg::Texture::NEAREST_MIPMAP_LINEAR);
|
||||
_filterRange.push_back(osg::Texture::NEAREST_MIPMAP_NEAREST);
|
||||
_filterRange.push_back(osg::Texture::ANISOTROPIC);
|
||||
_currPos = 0;
|
||||
_prevTime = 0.0;
|
||||
}
|
||||
@@ -240,7 +239,8 @@ osg::Node* createLayer(const osg::Vec3& offset,osg::Image* image,osg::Node* geom
|
||||
|
||||
// set up anistropic filtering.
|
||||
texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR_MIPMAP_LINEAR);
|
||||
texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::ANISOTROPIC);
|
||||
texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR);
|
||||
texture->setMaxAnisotropy(2.0f);
|
||||
|
||||
// add the transform node to root group node.
|
||||
top_transform->addChild(createTexturedItem(local_offset,texture,geometry));
|
||||
|
||||
Reference in New Issue
Block a user