I've played around with the --no-interpolate-imagery and --no-mip-mapping flags to see how they are affecting the texture filters but haven't found a way to set them to NEAREST. Is this possible using a flag in osgdem? Thanks,
-Ethan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46262#46262
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
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
Texture filter is controlled per osg::Texture, you can't override the
filtering without overriding a the texturing.
If you want to modify the filtering of the textures that an osgTerrain
based database they you'll need to load the scene graph then search
the scene graph to locate the TerrainTile, from these you can get the
color layers, and each of these layer with have the MinFilter and
MagFilter.
Robert.