1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Use ref_ptr

This commit is contained in:
scrawl 2016-08-14 16:41:33 +02:00
parent 0fbc0d0da7
commit 33d27a2285

View File

@ -239,7 +239,7 @@ UVController::UVController(const UVController& copy, const osg::CopyOp& copyop)
void UVController::setDefaults(osg::StateSet *stateset)
{
osg::TexMat* texMat = new osg::TexMat;
osg::ref_ptr<osg::TexMat> texMat (new osg::TexMat);
for (std::set<int>::const_iterator it = mTextureUnits.begin(); it != mTextureUnits.end(); ++it)
stateset->setTextureAttributeAndModes(*it, texMat, osg::StateAttribute::ON);
}