forked from mirror/openmw-tes3mp
Remove getWarningTexture in favor of getWarningImage
This commit is contained in:
parent
f99f403dda
commit
5ee3d1698f
3 changed files with 7 additions and 12 deletions
|
@ -137,7 +137,7 @@ public:
|
|||
AtmosphereNightUpdater(Resource::ImageManager* textureManager)
|
||||
{
|
||||
// we just need a texture, its contents don't really matter
|
||||
mTexture = textureManager->getWarningTexture();
|
||||
mTexture = new osg::Texture2D(textureManager->getWarningImage());
|
||||
}
|
||||
|
||||
void setFade(const float fade)
|
||||
|
|
|
@ -17,7 +17,7 @@ USE_OSGPLUGIN(jpeg)
|
|||
namespace
|
||||
{
|
||||
|
||||
osg::ref_ptr<osg::Texture2D> createWarningTexture()
|
||||
osg::ref_ptr<osg::Image> createWarningImage()
|
||||
{
|
||||
osg::ref_ptr<osg::Image> warningImage = new osg::Image;
|
||||
|
||||
|
@ -31,10 +31,7 @@ namespace
|
|||
data[3*i+1] = (0);
|
||||
data[3*i+2] = (255);
|
||||
}
|
||||
|
||||
osg::ref_ptr<osg::Texture2D> warningTexture = new osg::Texture2D;
|
||||
warningTexture->setImage(warningImage);
|
||||
return warningTexture;
|
||||
return warningImage;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,8 +41,7 @@ namespace Resource
|
|||
|
||||
ImageManager::ImageManager(const VFS::Manager *vfs)
|
||||
: mVFS(vfs)
|
||||
, mWarningTexture(createWarningTexture())
|
||||
, mWarningImage(mWarningTexture->getImage())
|
||||
, mWarningImage(createWarningImage())
|
||||
, mOptions(new osgDB::Options("dds_flip dds_dxt1_detect_rgba"))
|
||||
{
|
||||
}
|
||||
|
@ -137,9 +133,9 @@ namespace Resource
|
|||
}
|
||||
}
|
||||
|
||||
osg::Texture2D* ImageManager::getWarningTexture()
|
||||
osg::Image *ImageManager::getWarningImage()
|
||||
{
|
||||
return mWarningTexture.get();
|
||||
return mWarningImage;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace Resource
|
|||
|
||||
const VFS::Manager* getVFS() { return mVFS; }
|
||||
|
||||
osg::Texture2D* getWarningTexture();
|
||||
osg::Image* getWarningImage();
|
||||
|
||||
private:
|
||||
const VFS::Manager* mVFS;
|
||||
|
@ -47,7 +47,6 @@ namespace Resource
|
|||
// TODO: use ObjectCache
|
||||
std::map<std::string, osg::ref_ptr<osg::Image> > mImages;
|
||||
|
||||
osg::ref_ptr<osg::Texture2D> mWarningTexture;
|
||||
osg::ref_ptr<osg::Image> mWarningImage;
|
||||
osg::ref_ptr<osgDB::Options> mOptions;
|
||||
|
||||
|
|
Loading…
Reference in a new issue