mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Flip non-dds textures vertically
Fixes the up-side down loading screens.
This commit is contained in:
parent
31ead3a9f4
commit
140e67036c
@ -92,6 +92,15 @@ namespace Resource
|
||||
}
|
||||
|
||||
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);
|
||||
texture->setImage(image);
|
||||
texture->setWrap(osg::Texture::WRAP_S, wrapS);
|
||||
|
Loading…
Reference in New Issue
Block a user