And if it's not possible, is there any way to change the filters once I've read
a terrain.ive file into an osg project? I've seen this code snippet:
Code:
osg::osg::Node* terrain = osgDB::readNodeFile("terrain.ive");
osg::Texture2D* tex = new osg::Texture2D;
tex->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST);
tex->setFilter(osg::Texture::MAG_FILTER, osg::Texture::NEAREST);
terrain->getOrCreateStateSet()->setTextureAttribute(0, tex.get(),
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);
but that creates a new texture2d object that overwrites all of my other
textures instead of just changing the filter type. Any advice on this?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46441#46441
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org