#ifndef OPENMW_COMPONENTS_RESOURCE_IMAGEMANAGER_H #define OPENMW_COMPONENTS_RESOURCE_IMAGEMANAGER_H #include #include #include #include #include #include "resourcemanager.hpp" namespace osgDB { class Options; } namespace Resource { /// @brief Handles loading/caching of Images. /// @note May be used from any thread. class ImageManager : public ResourceManager { public: ImageManager(const VFS::Manager* vfs); ~ImageManager(); /// Create or retrieve an Image /// Returns the dummy image if the given image is not found. osg::ref_ptr getImage(const std::string& filename); osg::Image* getWarningImage(); private: osg::ref_ptr mWarningImage; osg::ref_ptr mOptions; ImageManager(const ImageManager&); void operator = (const ImageManager&); }; } #endif