Added TerrainNode::setColorFilter(layerNum,Filter) to allow developers to set
what type of texture filter to use, either LINEAER and NEAREST.
This commit is contained in:
@@ -84,6 +84,8 @@ int main(int argc, char** argv)
|
||||
|
||||
unsigned int layerNum = 0;
|
||||
|
||||
std::string filterName;
|
||||
|
||||
bool readParameter = false;
|
||||
float minValue, maxValue;
|
||||
int pos = 1;
|
||||
@@ -174,6 +176,27 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
else if (arguments.read(pos, "--filter",filterName))
|
||||
{
|
||||
readParameter = true;
|
||||
|
||||
if (filterName=="NEAREST")
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"--filter "<<filterName<<std::endl;
|
||||
terrain->setColorFilter(layerNum, osgTerrain::TerrainNode::NEAREST);
|
||||
}
|
||||
else if (filterName=="LINEAER")
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"--filter "<<filterName<<std::endl;
|
||||
terrain->setColorFilter(layerNum, osgTerrain::TerrainNode::LINEAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"--filter "<<filterName<<" unrecognized filter name, please use LINEAER or NEAREST."<<std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (arguments.read(pos, "--tf",minValue, maxValue))
|
||||
{
|
||||
readParameter = true;
|
||||
|
||||
Reference in New Issue
Block a user