diff --git a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp index ac00caf01..f0c2b27c8 100644 --- a/src/osgPlugins/dae/daeRMaterials.cpp +++ b/src/osgPlugins/dae/daeRMaterials.cpp @@ -672,7 +672,6 @@ osg::StateAttribute *daeReader::processTexture( domCommon_color_or_texture_type_ osg::Texture::WrapMode wrap; switch( sampler->getWrap_s()->getValue() ) { - case FX_SAMPLER_WRAP_COMMON_NONE: case FX_SAMPLER_WRAP_COMMON_WRAP: wrap = osg::Texture::REPEAT; break; @@ -680,8 +679,9 @@ osg::StateAttribute *daeReader::processTexture( domCommon_color_or_texture_type_ wrap = osg::Texture::MIRROR; break; case FX_SAMPLER_WRAP_COMMON_CLAMP: - wrap = osg::Texture::CLAMP; + wrap = osg::Texture::CLAMP_TO_EDGE; break; + case FX_SAMPLER_WRAP_COMMON_NONE: case FX_SAMPLER_WRAP_COMMON_BORDER: wrap = osg::Texture::CLAMP_TO_BORDER; break; @@ -700,7 +700,6 @@ osg::StateAttribute *daeReader::processTexture( domCommon_color_or_texture_type_ osg::Texture::WrapMode wrap; switch( sampler->getWrap_t()->getValue() ) { - case FX_SAMPLER_WRAP_COMMON_NONE: case FX_SAMPLER_WRAP_COMMON_WRAP: wrap = osg::Texture::REPEAT; break; @@ -708,12 +707,13 @@ osg::StateAttribute *daeReader::processTexture( domCommon_color_or_texture_type_ wrap = osg::Texture::MIRROR; break; case FX_SAMPLER_WRAP_COMMON_CLAMP: - wrap = osg::Texture::CLAMP; + wrap = osg::Texture::CLAMP_TO_EDGE; break; + case FX_SAMPLER_WRAP_COMMON_NONE: case FX_SAMPLER_WRAP_COMMON_BORDER: wrap = osg::Texture::CLAMP_TO_BORDER; break; - default: + default: wrap = osg::Texture::CLAMP; break; } diff --git a/src/osgPlugins/dae/daeWMaterials.cpp b/src/osgPlugins/dae/daeWMaterials.cpp index d31845742..4c00c7e1e 100644 --- a/src/osgPlugins/dae/daeWMaterials.cpp +++ b/src/osgPlugins/dae/daeWMaterials.cpp @@ -126,10 +126,10 @@ void daeWriter::processMaterial( osg::StateSet *ss, domInstance_geometry *ig, co switch( wrap ) { case osg::Texture::CLAMP: + case osg::Texture::CLAMP_TO_EDGE: wrap_s->setValue( FX_SAMPLER_WRAP_COMMON_CLAMP ); break; case osg::Texture::CLAMP_TO_BORDER: - case osg::Texture::CLAMP_TO_EDGE: wrap_s->setValue( FX_SAMPLER_WRAP_COMMON_BORDER ); break; case osg::Texture::REPEAT: @@ -148,10 +148,10 @@ void daeWriter::processMaterial( osg::StateSet *ss, domInstance_geometry *ig, co switch( wrap ) { case osg::Texture::CLAMP: + case osg::Texture::CLAMP_TO_EDGE: wrap_t->setValue( FX_SAMPLER_WRAP_COMMON_CLAMP ); break; case osg::Texture::CLAMP_TO_BORDER: - case osg::Texture::CLAMP_TO_EDGE: wrap_t->setValue( FX_SAMPLER_WRAP_COMMON_BORDER ); break; case osg::Texture::REPEAT: