mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 09:23:51 +00:00
Flip non-dds textures vertically
Fixes the up-side down loading screens.
This commit is contained in:
parent
31ead3a9f4
commit
140e67036c
1 changed files with 9 additions and 0 deletions
|
@ -92,6 +92,15 @@ namespace Resource
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Image* image = result.getImage();
|
osg::Image* image = result.getImage();
|
||||||
|
|
||||||
|
// We need to flip images, because the Morrowind texture coordinates use the DirectX convention (top-left image origin),
|
||||||
|
// but OpenGL uses bottom left as the image origin.
|
||||||
|
// For some reason this doesn't concern DDS textures, which are already flipped when loaded.
|
||||||
|
if (ext != "dds")
|
||||||
|
{
|
||||||
|
image->flipVertical();
|
||||||
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::Texture2D> texture(new osg::Texture2D);
|
osg::ref_ptr<osg::Texture2D> texture(new osg::Texture2D);
|
||||||
texture->setImage(image);
|
texture->setImage(image);
|
||||||
texture->setWrap(osg::Texture::WRAP_S, wrapS);
|
texture->setWrap(osg::Texture::WRAP_S, wrapS);
|
||||||
|
|
Loading…
Reference in a new issue