From Michael Platings, "Here are a couple more fixes on top of what you've already done." (in reply to fixes submission from Roland Smeenk).

This commit is contained in:
Robert Osfield
2010-03-04 12:59:53 +00:00
parent 225d99c5f1
commit f1dd820a4e
2 changed files with 9 additions and 19 deletions

View File

@@ -840,9 +840,8 @@ osg::Texture::WrapMode getWrapMode(domFx_sampler_wrap_common domWrap)
case FX_SAMPLER_WRAP_COMMON_BORDER:
return osg::Texture::CLAMP_TO_BORDER;
default:
;// fall through
osg::notify(osg::WARN) << "Unrecognised domFx_sampler_wrap_common." << std::endl;
}
return osg::Texture::CLAMP;
}
@@ -850,30 +849,21 @@ osg::Texture::FilterMode getFilterMode(domFx_sampler_filter_common domFilter, bo
{
switch (domFilter)
{
case FX_SAMPLER_FILTER_COMMON_NONE:
case FX_SAMPLER_FILTER_COMMON_NEAREST:
return osg::Texture::NEAREST;
case FX_SAMPLER_FILTER_COMMON_LINEAR:
return osg::Texture::LINEAR;
case FX_SAMPLER_FILTER_COMMON_NEAREST_MIPMAP_NEAREST:
if (allowMipMap)
return osg::Texture::NEAREST_MIPMAP_NEAREST;
break;
return allowMipMap ? osg::Texture::NEAREST_MIPMAP_NEAREST : osg::Texture::NEAREST;
case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_NEAREST:
if (allowMipMap)
return osg::Texture::LINEAR_MIPMAP_NEAREST;
break;
return allowMipMap ? osg::Texture::LINEAR_MIPMAP_NEAREST : osg::Texture::LINEAR;
case FX_SAMPLER_FILTER_COMMON_NEAREST_MIPMAP_LINEAR:
if (allowMipMap)
return osg::Texture::NEAREST_MIPMAP_LINEAR;
break;
return allowMipMap ? osg::Texture::NEAREST_MIPMAP_LINEAR : osg::Texture::NEAREST;
case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_LINEAR:
if (allowMipMap)
return osg::Texture::LINEAR_MIPMAP_LINEAR;
break;
case FX_SAMPLER_FILTER_COMMON_NONE:
return osg::Texture::NEAREST;
return allowMipMap ? osg::Texture::LINEAR_MIPMAP_LINEAR : osg::Texture::LINEAR;
default:
; // Fall through
osg::notify(osg::WARN) << "Unrecognised domFx_sampler_filter_common." << std::endl;
}
return osg::Texture::LINEAR;
}

View File

@@ -116,8 +116,8 @@ void daeReader::processSkins()
if (pDomSkeletons.getCount() == 0)
{
domNode* skelNode = _skeletonMap.begin()->first;
if (skelNode == findSkeletonNode(skelNode, pDomInstanceController))
domNode* skelNode = findSkeletonNode(_skeletonMap.begin()->first, pDomInstanceController);
if (skelNode)
{
skelSkinMap[skelNode].push_back(pDomInstanceController);
}