diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 346c672f7..d053d8bfd 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 35602fa17..2c5831dae 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include // KeyframeHolder #include diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 2237d8125..d1b5f6fda 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include diff --git a/apps/openmw/mwrender/ripplesimulation.cpp b/apps/openmw/mwrender/ripplesimulation.cpp index 603cd397b..6cfcbc498 100644 --- a/apps/openmw/mwrender/ripplesimulation.cpp +++ b/apps/openmw/mwrender/ripplesimulation.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 2a25baea9..0f70e2c02 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include @@ -134,7 +134,7 @@ private: class AtmosphereNightUpdater : public SceneUtil::StateSetUpdater { public: - AtmosphereNightUpdater(Resource::TextureManager* textureManager) + AtmosphereNightUpdater(Resource::ImageManager* textureManager) { // we just need a texture, its contents don't really matter mTexture = textureManager->getWarningTexture(); @@ -469,7 +469,7 @@ const float CelestialBody::mDistance = 1000.0f; class Sun : public CelestialBody { public: - Sun(osg::Group* parentNode, Resource::TextureManager& textureManager) + Sun(osg::Group* parentNode, Resource::ImageManager& textureManager) : CelestialBody(parentNode, 1.0f, 1) , mUpdater(new Updater) { @@ -602,7 +602,7 @@ private: return oqn; } - void createSunFlash(Resource::TextureManager& textureManager) + void createSunFlash(Resource::ImageManager& textureManager) { osg::ref_ptr tex (new osg::Texture2D(textureManager.getImage("textures/tx_sun_flash_grey_05.dds"))); tex->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); @@ -932,7 +932,7 @@ public: Type_Secunda }; - Moon(osg::Group* parentNode, Resource::TextureManager& textureManager, float scaleFactor, Type type) + Moon(osg::Group* parentNode, Resource::ImageManager& textureManager, float scaleFactor, Type type) : CelestialBody(parentNode, scaleFactor, 2) , mType(type) , mPhase(MoonState::Phase_Unspecified) @@ -1001,7 +1001,7 @@ public: private: struct Updater : public SceneUtil::StateSetUpdater { - Resource::TextureManager& mTextureManager; + Resource::ImageManager& mTextureManager; osg::ref_ptr mPhaseTex; osg::ref_ptr mCircleTex; float mTransparency; @@ -1009,7 +1009,7 @@ private: osg::Vec4f mAtmosphereColor; osg::Vec4f mMoonColor; - Updater(Resource::TextureManager& textureManager) + Updater(Resource::ImageManager& textureManager) : mTextureManager(textureManager) , mPhaseTex() , mCircleTex() diff --git a/apps/openmw/mwrender/util.cpp b/apps/openmw/mwrender/util.cpp index df6a0497f..3c8d1408a 100644 --- a/apps/openmw/mwrender/util.cpp +++ b/apps/openmw/mwrender/util.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include namespace MWRender diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index ff3156411..7d1221a53 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 089779eda..0b54ddeb7 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -41,7 +41,7 @@ add_component_dir (vfs ) add_component_dir (resource - scenemanager keyframemanager texturemanager resourcesystem bulletshapemanager bulletshape niffilemanager objectcache + scenemanager keyframemanager imagemanager resourcesystem bulletshapemanager bulletshape niffilemanager objectcache ) add_component_dir (sceneutil diff --git a/components/myguiplatform/myguiplatform.cpp b/components/myguiplatform/myguiplatform.cpp index 22b88438f..491af8486 100644 --- a/components/myguiplatform/myguiplatform.cpp +++ b/components/myguiplatform/myguiplatform.cpp @@ -7,7 +7,7 @@ namespace osgMyGUI { -Platform::Platform(osgViewer::Viewer *viewer, osg::Group *guiRoot, Resource::TextureManager *textureManager, float uiScalingFactor) +Platform::Platform(osgViewer::Viewer *viewer, osg::Group *guiRoot, Resource::ImageManager *textureManager, float uiScalingFactor) : mRenderManager(nullptr) , mDataManager(nullptr) , mLogManager(nullptr) diff --git a/components/myguiplatform/myguiplatform.hpp b/components/myguiplatform/myguiplatform.hpp index 90d45ce20..b3f959798 100644 --- a/components/myguiplatform/myguiplatform.hpp +++ b/components/myguiplatform/myguiplatform.hpp @@ -13,7 +13,7 @@ namespace osg } namespace Resource { - class TextureManager; + class ImageManager; } namespace MyGUI { @@ -30,7 +30,7 @@ namespace osgMyGUI class Platform { public: - Platform(osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::TextureManager* textureManager, float uiScalingFactor); + Platform(osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ImageManager* textureManager, float uiScalingFactor); ~Platform(); diff --git a/components/myguiplatform/myguirendermanager.cpp b/components/myguiplatform/myguirendermanager.cpp index f5bebd560..23d004f47 100644 --- a/components/myguiplatform/myguirendermanager.cpp +++ b/components/myguiplatform/myguirendermanager.cpp @@ -15,7 +15,7 @@ #include -#include +#include #include "myguitexture.hpp" @@ -353,7 +353,7 @@ void OSGVertexBuffer::create() // --------------------------------------------------------------------------- -RenderManager::RenderManager(osgViewer::Viewer *viewer, osg::Group *sceneroot, Resource::TextureManager* textureManager, float scalingFactor) +RenderManager::RenderManager(osgViewer::Viewer *viewer, osg::Group *sceneroot, Resource::ImageManager* textureManager, float scalingFactor) : mViewer(viewer) , mSceneRoot(sceneroot) , mTextureManager(textureManager) diff --git a/components/myguiplatform/myguirendermanager.hpp b/components/myguiplatform/myguirendermanager.hpp index f2251cdb0..b1aa0d3f0 100644 --- a/components/myguiplatform/myguirendermanager.hpp +++ b/components/myguiplatform/myguirendermanager.hpp @@ -7,7 +7,7 @@ namespace Resource { - class TextureManager; + class ImageManager; } namespace osgViewer @@ -33,7 +33,7 @@ class RenderManager : public MyGUI::RenderManager, public MyGUI::IRenderTarget osg::ref_ptr mViewer; osg::ref_ptr mSceneRoot; osg::ref_ptr mDrawable; - Resource::TextureManager* mTextureManager; + Resource::ImageManager* mTextureManager; MyGUI::IntSize mViewSize; bool mUpdate; @@ -54,7 +54,7 @@ class RenderManager : public MyGUI::RenderManager, public MyGUI::IRenderTarget void destroyAllResources(); public: - RenderManager(osgViewer::Viewer *viewer, osg::Group *sceneroot, Resource::TextureManager* textureManager, float scalingFactor); + RenderManager(osgViewer::Viewer *viewer, osg::Group *sceneroot, Resource::ImageManager* textureManager, float scalingFactor); virtual ~RenderManager(); void initialise(); diff --git a/components/myguiplatform/myguitexture.cpp b/components/myguiplatform/myguitexture.cpp index 3560a3ae3..904ed6abf 100644 --- a/components/myguiplatform/myguitexture.cpp +++ b/components/myguiplatform/myguitexture.cpp @@ -5,12 +5,12 @@ #include -#include +#include namespace osgMyGUI { - OSGTexture::OSGTexture(const std::string &name, Resource::TextureManager* textureManager) + OSGTexture::OSGTexture(const std::string &name, Resource::ImageManager* textureManager) : mName(name) , mTextureManager(textureManager) , mFormat(MyGUI::PixelFormat::Unknow) diff --git a/components/myguiplatform/myguitexture.hpp b/components/myguiplatform/myguitexture.hpp index de385e94d..21bc89992 100644 --- a/components/myguiplatform/myguitexture.hpp +++ b/components/myguiplatform/myguitexture.hpp @@ -13,7 +13,7 @@ namespace osg namespace Resource { - class TextureManager; + class ImageManager; } namespace osgMyGUI @@ -21,7 +21,7 @@ namespace osgMyGUI class OSGTexture : public MyGUI::ITexture { std::string mName; - Resource::TextureManager* mTextureManager; + Resource::ImageManager* mTextureManager; osg::ref_ptr mLockedImage; osg::ref_ptr mTexture; @@ -30,7 +30,7 @@ namespace osgMyGUI size_t mNumElemBytes; public: - OSGTexture(const std::string &name, Resource::TextureManager* textureManager); + OSGTexture(const std::string &name, Resource::ImageManager* textureManager); OSGTexture(osg::Texture2D* texture); virtual ~OSGTexture(); diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 190fd020f..d09c34aa5 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -11,7 +11,7 @@ // resource #include #include -#include +#include // skel #include @@ -343,7 +343,7 @@ namespace NifOsg } } - osg::ref_ptr load(Nif::NIFFilePtr nif, Resource::TextureManager* textureManager) + osg::ref_ptr load(Nif::NIFFilePtr nif, Resource::ImageManager* textureManager) { if (nif->numRoots() < 1) nif->fail("Found no root nodes"); @@ -369,7 +369,7 @@ namespace NifOsg return created; } - void applyNodeProperties(const Nif::Node *nifNode, osg::Node *applyTo, SceneUtil::CompositeStateSetUpdater* composite, Resource::TextureManager* textureManager, std::vector& boundTextures, int animflags) + void applyNodeProperties(const Nif::Node *nifNode, osg::Node *applyTo, SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* textureManager, std::vector& boundTextures, int animflags) { const Nif::PropertyList& props = nifNode->props; for (size_t i = 0; i handleNode(const Nif::Node* nifNode, osg::Group* parentNode, Resource::TextureManager* textureManager, + osg::ref_ptr handleNode(const Nif::Node* nifNode, osg::Group* parentNode, Resource::ImageManager* textureManager, std::vector boundTextures, int animflags, int particleflags, bool skipMeshes, TextKeyMap* textKeys, osg::Node* rootNode=NULL) { osg::ref_ptr node = new osg::MatrixTransform(nifNode->trafo.toMatrix()); @@ -682,7 +682,7 @@ namespace NifOsg } } - void handleTextureControllers(const Nif::Property *texProperty, SceneUtil::CompositeStateSetUpdater* composite, Resource::TextureManager* textureManager, osg::StateSet *stateset, int animflags) + void handleTextureControllers(const Nif::Property *texProperty, SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* textureManager, osg::StateSet *stateset, int animflags) { for (Nif::ControllerPtr ctrl = texProperty->controller; !ctrl.empty(); ctrl = ctrl->next) { @@ -1244,7 +1244,7 @@ namespace NifOsg } void handleProperty(const Nif::Property *property, - osg::Node *node, SceneUtil::CompositeStateSetUpdater* composite, Resource::TextureManager* textureManager, std::vector& boundTextures, int animflags) + osg::Node *node, SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* textureManager, std::vector& boundTextures, int animflags) { switch (property->recType) { @@ -1543,7 +1543,7 @@ namespace NifOsg }; - osg::ref_ptr Loader::load(Nif::NIFFilePtr file, Resource::TextureManager* textureManager) + osg::ref_ptr Loader::load(Nif::NIFFilePtr file, Resource::ImageManager* textureManager) { LoaderImpl impl(file->getFilename()); return impl.load(file, textureManager); diff --git a/components/nifosg/nifloader.hpp b/components/nifosg/nifloader.hpp index e15df5302..afc912ed3 100644 --- a/components/nifosg/nifloader.hpp +++ b/components/nifosg/nifloader.hpp @@ -15,7 +15,7 @@ namespace osg namespace Resource { - class TextureManager; + class ImageManager; } namespace NifOsg @@ -62,7 +62,7 @@ namespace NifOsg { public: /// Create a scene graph for the given NIF. Auto-detects when skinning is used and wraps the graph in a Skeleton if so. - static osg::ref_ptr load(Nif::NIFFilePtr file, Resource::TextureManager* textureManager); + static osg::ref_ptr load(Nif::NIFFilePtr file, Resource::ImageManager* textureManager); /// Load keyframe controllers from the given kf file. static void loadKf(Nif::NIFFilePtr kf, KeyframeHolder& target); diff --git a/components/resource/texturemanager.cpp b/components/resource/imagemanager.cpp similarity index 94% rename from components/resource/texturemanager.cpp rename to components/resource/imagemanager.cpp index b3f23ab40..8b14e7237 100644 --- a/components/resource/texturemanager.cpp +++ b/components/resource/imagemanager.cpp @@ -1,4 +1,4 @@ -#include "texturemanager.hpp" +#include "imagemanager.hpp" #include #include @@ -42,7 +42,7 @@ namespace namespace Resource { - TextureManager::TextureManager(const VFS::Manager *vfs) + ImageManager::ImageManager(const VFS::Manager *vfs) : mVFS(vfs) , mWarningTexture(createWarningTexture()) , mWarningImage(mWarningTexture->getImage()) @@ -50,7 +50,7 @@ namespace Resource { } - TextureManager::~TextureManager() + ImageManager::~ImageManager() { } @@ -88,7 +88,7 @@ namespace Resource return true; } - osg::ref_ptr TextureManager::getImage(const std::string &filename) + osg::ref_ptr ImageManager::getImage(const std::string &filename) { std::string normalized = filename; mVFS->normalizeFilename(normalized); @@ -137,7 +137,7 @@ namespace Resource } } - osg::Texture2D* TextureManager::getWarningTexture() + osg::Texture2D* ImageManager::getWarningTexture() { return mWarningTexture.get(); } diff --git a/components/resource/texturemanager.hpp b/components/resource/imagemanager.hpp similarity index 83% rename from components/resource/texturemanager.hpp rename to components/resource/imagemanager.hpp index 0290d2340..14d0b673e 100644 --- a/components/resource/texturemanager.hpp +++ b/components/resource/imagemanager.hpp @@ -27,11 +27,11 @@ namespace Resource { /// @brief Handles loading/caching of Images. - class TextureManager + class ImageManager { public: - TextureManager(const VFS::Manager* vfs); - ~TextureManager(); + ImageManager(const VFS::Manager* vfs); + ~ImageManager(); /// Create or retrieve an Image /// Returns the dummy image if the given image is not found. @@ -51,8 +51,8 @@ namespace Resource osg::ref_ptr mWarningImage; osg::ref_ptr mOptions; - TextureManager(const TextureManager&); - void operator = (const TextureManager&); + ImageManager(const ImageManager&); + void operator = (const ImageManager&); }; } diff --git a/components/resource/resourcesystem.cpp b/components/resource/resourcesystem.cpp index 2ce8d22e6..89a4b2cb3 100644 --- a/components/resource/resourcesystem.cpp +++ b/components/resource/resourcesystem.cpp @@ -1,7 +1,7 @@ #include "resourcesystem.hpp" #include "scenemanager.hpp" -#include "texturemanager.hpp" +#include "imagemanager.hpp" #include "niffilemanager.hpp" #include "keyframemanager.hpp" @@ -13,7 +13,7 @@ namespace Resource { mNifFileManager.reset(new NifFileManager(vfs)); mKeyframeManager.reset(new KeyframeManager(vfs)); - mTextureManager.reset(new TextureManager(vfs)); + mTextureManager.reset(new ImageManager(vfs)); mSceneManager.reset(new SceneManager(vfs, mTextureManager.get(), mNifFileManager.get())); } @@ -27,7 +27,7 @@ namespace Resource return mSceneManager.get(); } - TextureManager* ResourceSystem::getTextureManager() + ImageManager* ResourceSystem::getTextureManager() { return mTextureManager.get(); } diff --git a/components/resource/resourcesystem.hpp b/components/resource/resourcesystem.hpp index 3e1a793ca..7c4d83b7d 100644 --- a/components/resource/resourcesystem.hpp +++ b/components/resource/resourcesystem.hpp @@ -12,7 +12,7 @@ namespace Resource { class SceneManager; - class TextureManager; + class ImageManager; class NifFileManager; class KeyframeManager; @@ -26,7 +26,7 @@ namespace Resource ~ResourceSystem(); SceneManager* getSceneManager(); - TextureManager* getTextureManager(); + ImageManager* getTextureManager(); NifFileManager* getNifFileManager(); KeyframeManager* getKeyframeManager(); @@ -37,7 +37,7 @@ namespace Resource private: std::auto_ptr mSceneManager; - std::auto_ptr mTextureManager; + std::auto_ptr mTextureManager; std::auto_ptr mNifFileManager; std::auto_ptr mKeyframeManager; diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index e3f38e886..287186887 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -24,7 +24,7 @@ #include #include -#include "texturemanager.hpp" +#include "imagemanager.hpp" #include "niffilemanager.hpp" namespace @@ -227,7 +227,7 @@ namespace Resource - SceneManager::SceneManager(const VFS::Manager *vfs, Resource::TextureManager* textureManager, Resource::NifFileManager* nifFileManager) + SceneManager::SceneManager(const VFS::Manager *vfs, Resource::ImageManager* textureManager, Resource::NifFileManager* nifFileManager) : mVFS(vfs) , mTextureManager(textureManager) , mNifFileManager(nifFileManager) @@ -249,7 +249,7 @@ namespace Resource class ImageReadCallback : public osgDB::ReadFileCallback { public: - ImageReadCallback(Resource::TextureManager* textureMgr) + ImageReadCallback(Resource::ImageManager* textureMgr) : mTextureManager(textureMgr) { } @@ -267,7 +267,7 @@ namespace Resource } private: - Resource::TextureManager* mTextureManager; + Resource::ImageManager* mTextureManager; }; std::string getFileExtension(const std::string& file) @@ -278,7 +278,7 @@ namespace Resource return std::string(); } - osg::ref_ptr load (Files::IStreamPtr file, const std::string& normalizedFilename, Resource::TextureManager* textureMgr, Resource::NifFileManager* nifFileManager) + osg::ref_ptr load (Files::IStreamPtr file, const std::string& normalizedFilename, Resource::ImageManager* textureMgr, Resource::NifFileManager* nifFileManager) { std::string ext = getFileExtension(normalizedFilename); if (ext == "nif") @@ -408,7 +408,7 @@ namespace Resource return mVFS; } - Resource::TextureManager* SceneManager::getTextureManager() + Resource::ImageManager* SceneManager::getTextureManager() { return mTextureManager; } diff --git a/components/resource/scenemanager.hpp b/components/resource/scenemanager.hpp index ae5fa2db6..6eadf7b45 100644 --- a/components/resource/scenemanager.hpp +++ b/components/resource/scenemanager.hpp @@ -10,7 +10,7 @@ namespace Resource { - class TextureManager; + class ImageManager; class NifFileManager; } @@ -36,7 +36,7 @@ namespace Resource class SceneManager { public: - SceneManager(const VFS::Manager* vfs, Resource::TextureManager* textureManager, Resource::NifFileManager* nifFileManager); + SceneManager(const VFS::Manager* vfs, Resource::ImageManager* textureManager, Resource::NifFileManager* nifFileManager); ~SceneManager(); /// Get a read-only copy of this scene "template" @@ -70,7 +70,7 @@ namespace Resource const VFS::Manager* getVFS() const; - Resource::TextureManager* getTextureManager(); + Resource::ImageManager* getTextureManager(); /// @param mask The node mask to apply to loaded particle system nodes. void setParticleSystemMask(unsigned int mask); @@ -89,7 +89,7 @@ namespace Resource private: const VFS::Manager* mVFS; - Resource::TextureManager* mTextureManager; + Resource::ImageManager* mTextureManager; Resource::NifFileManager* mNifFileManager; osg::Texture::FilterMode mMinFilter; diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index 58675a714..094023f38 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include