mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-03 17:54:06 +00:00
Merge branch '9' into 'master'
IMPORTANT!! racingcrashfix #4766 See merge request OpenMW/openmw!119
This commit is contained in:
commit
bb72ed9744
@ -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;
|
||||
|
@ -163,6 +163,7 @@ namespace Shader
|
||||
if (image)
|
||||
{
|
||||
osg::ref_ptr<osg::Texture2D> normalMapTex (new osg::Texture2D(image));
|
||||
normalMapTex->setTextureSize(image->s(), image->t());
|
||||
normalMapTex->setWrap(osg::Texture::WRAP_S, diffuseMap->getWrap(osg::Texture::WRAP_S));
|
||||
normalMapTex->setWrap(osg::Texture::WRAP_T, diffuseMap->getWrap(osg::Texture::WRAP_T));
|
||||
normalMapTex->setFilter(osg::Texture::MIN_FILTER, diffuseMap->getFilter(osg::Texture::MIN_FILTER));
|
||||
@ -186,7 +187,9 @@ namespace Shader
|
||||
boost::replace_last(specularMapFileName, ".", mSpecularMapPattern + ".");
|
||||
if (mImageManager.getVFS()->exists(specularMapFileName))
|
||||
{
|
||||
osg::ref_ptr<osg::Texture2D> specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMapFileName)));
|
||||
osg::ref_ptr<osg::Image> image (mImageManager.getImage(specularMapFileName));
|
||||
osg::ref_ptr<osg::Texture2D> specularMapTex (new osg::Texture2D(image));
|
||||
specularMapTex->setTextureSize(image->s(), image->t());
|
||||
specularMapTex->setWrap(osg::Texture::WRAP_S, diffuseMap->getWrap(osg::Texture::WRAP_S));
|
||||
specularMapTex->setWrap(osg::Texture::WRAP_T, diffuseMap->getWrap(osg::Texture::WRAP_T));
|
||||
specularMapTex->setFilter(osg::Texture::MIN_FILTER, diffuseMap->getFilter(osg::Texture::MIN_FILTER));
|
||||
|
Loading…
x
Reference in New Issue
Block a user