From ac2612926ee61d2f5d4bcb3226cb783b567ecdc8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 27 Mar 2015 23:25:15 +0100 Subject: [PATCH] Disable unRefImageDataAfterApply --- components/nifosg/nifloader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 1a36af4c4..3b68df562 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -1407,7 +1407,8 @@ namespace NifOsg osgDB::ReaderWriter::ReadResult result = reader->readImage(*mResourceManager->get(filename.c_str()), opts); osg::Image* image = result.getImage(); osg::Texture2D* texture2d = new osg::Texture2D; - texture2d->setUnRefImageDataAfterApply(true); + // Can be enabled for single-context, i.e. in openmw + //texture2d->setUnRefImageDataAfterApply(true); texture2d->setImage(image); unsigned int clamp = static_cast(tex.clamp);