OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
imagemanager.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_RESOURCE_IMAGEMANAGER_H
2 #define OPENMW_COMPONENTS_RESOURCE_IMAGEMANAGER_H
3 
4 #include <string>
5 #include <map>
6 
7 #include <osg/ref_ptr>
8 #include <osg/Image>
9 #include <osg/Texture2D>
10 
11 #include "resourcemanager.hpp"
12 
13 namespace osgDB
14 {
15  class Options;
16 }
17 
18 namespace Resource
19 {
20 
24  {
25  public:
26  ImageManager(const VFS::Manager* vfs);
27  ~ImageManager();
28 
31  osg::ref_ptr<osg::Image> getImage(const std::string& filename);
32 
33  osg::Image* getWarningImage();
34 
35  void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
36 
37  private:
38  osg::ref_ptr<osg::Image> mWarningImage;
39  osg::ref_ptr<osgDB::Options> mOptions;
40 
41  ImageManager(const ImageManager&);
42  void operator = (const ImageManager&);
43  };
44 
45 }
46 
47 #endif
osg::ref_ptr< osgDB::Options > mOptions
Definition: imagemanager.hpp:39
void reportStats(unsigned int frameNumber, osg::Stats *stats) const
Definition: imagemanager.cpp:163
void operator=(const ImageManager &)
Handles loading/caching of Images.
Definition: imagemanager.hpp:23
~ImageManager()
Definition: imagemanager.cpp:54
osg::Image * getWarningImage()
Definition: imagemanager.cpp:158
osg::ref_ptr< osg::Image > getImage(const std::string &filename)
Definition: imagemanager.cpp:84
ImageManager(const VFS::Manager *vfs)
Definition: imagemanager.cpp:47
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
Base class for managers that require a virtual file system and object cache.
Definition: resourcemanager.hpp:23
osg::ref_ptr< osg::Image > mWarningImage
Definition: imagemanager.hpp:38