|
|
|
@ -400,7 +400,10 @@ namespace NifOsg
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
osg::ref_ptr<osg::Texture2D> texture2d (new osg::Texture2D(handleSourceTexture(textureEffect->texture.getPtr(), imageManager)));
|
|
|
|
|
osg::ref_ptr<osg::Image> image (handleSourceTexture(textureEffect->texture.getPtr(), imageManager));
|
|
|
|
|
osg::ref_ptr<osg::Texture2D> texture2d (new osg::Texture2D(image));
|
|
|
|
|
if (image)
|
|
|
|
|
texture2d->setTextureSize(image->s(), image->t());
|
|
|
|
|
texture2d->setName("envMap");
|
|
|
|
|
unsigned int clamp = static_cast<unsigned int>(textureEffect->clamp);
|
|
|
|
|
int wrapT = (clamp) & 0x1;
|
|
|
|
@ -771,7 +774,10 @@ namespace NifOsg
|
|
|
|
|
wrapT = inherit->getWrap(osg::Texture2D::WRAP_T);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
osg::ref_ptr<osg::Texture2D> texture (new osg::Texture2D(handleSourceTexture(st.getPtr(), imageManager)));
|
|
|
|
|
osg::ref_ptr<osg::Image> image (handleSourceTexture(st.getPtr(), imageManager));
|
|
|
|
|
osg::ref_ptr<osg::Texture2D> texture (new osg::Texture2D(image));
|
|
|
|
|
if (image)
|
|
|
|
|
texture->setTextureSize(image->s(), image->t());
|
|
|
|
|
texture->setWrap(osg::Texture::WRAP_S, wrapS);
|
|
|
|
|
texture->setWrap(osg::Texture::WRAP_T, wrapT);
|
|
|
|
|
textures.push_back(texture);
|
|
|
|
@ -1338,6 +1344,8 @@ namespace NifOsg
|
|
|
|
|
const Nif::NiSourceTexture *st = tex.texture.getPtr();
|
|
|
|
|
osg::ref_ptr<osg::Image> image = handleSourceTexture(st, imageManager);
|
|
|
|
|
texture2d = new osg::Texture2D(image);
|
|
|
|
|
if (image)
|
|
|
|
|
texture2d->setTextureSize(image->s(), image->t());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
texture2d = new osg::Texture2D;
|
|
|
|
|