~guillaume-chereau/stellarium/fix-orbits

« back to all changes in this revision

Viewing changes to src/core/StelTextureMgr.hpp

  • Committer: Guillaume Chereau
  • Date: 2017-01-03 00:38:49 UTC
  • mfrom: (8528.1.525 trunk)
  • Revision ID: guillaume@noctua-software.com-20170103003849-cgf0w0doticpzzff
Merge branch 'stellarium' into fix-orbits

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
class StelTextureMgr : QObject
34
34
{
35
35
public:
36
 
        //! Initialize some variable from the openGL context.
37
 
        //! Must be called after the creation of the GLContext.
38
 
        void init();
39
 
 
40
36
        //! Load an image from a file and create a new texture from it
41
37
        //! @param filename the texture file name, can be absolute path if starts with '/' otherwise
42
38
        //!    the file will be looked for in Stellarium's standard textures directories.
50
46
        //! @param lazyLoading define whether the texture should be actually loaded only when needed, i.e. when bind() is called the first time.
51
47
        StelTextureSP createTextureThread(const QString& url, const StelTexture::StelTextureParams& params=StelTexture::StelTextureParams(), bool lazyLoading=true);
52
48
 
 
49
        //! Returns the estimated memory usage of all textures currently loaded through StelTexture
 
50
        int getGLMemoryUsage();
 
51
 
53
52
private:
54
53
        friend class StelTexture;
55
54
        friend class ImageLoader;
 
55
        friend class StelApp;
 
56
 
 
57
        //! Private constructor, use StelApp::getTextureManager for the correct instance
 
58
        StelTextureMgr();
 
59
 
 
60
        //! Initialize some variable from the openGL context.
 
61
        //! Must be called after the creation of the GLContext.
 
62
        void init();
 
63
 
 
64
        int glMemoryUsage;
56
65
};
57
66
 
58
67