Implemented texture and VBO swapping system that keeps GPU memory utilization within limits

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4091
This commit is contained in:
kearwood
2012-09-11 04:32:04 +00:00
parent 34c7dc7b53
commit 754496fe06
12 changed files with 65 additions and 16 deletions

View File

@@ -30,7 +30,8 @@
//
#define KRENGINE_MAX_TEXTURE_UNITS 8
#define KRENGINE_MAX_TEXTURE_HANDLES 20
#define KRENGINE_MAX_TEXTURE_HANDLES 1000
#define KRENGINE_MAX_TEXTURE_MEM 100000000
#ifndef KRTEXTUREMANAGER_H
#define KRTEXTUREMANAGER_H
@@ -58,11 +59,15 @@ public:
KRTexture *getTexture(const char *szFile);
long getMemUsed();
private:
std::map<std::string, KRTexture *> m_textures;
KRTexture *m_activeTextures[KRENGINE_MAX_TEXTURE_UNITS];
std::set<KRTexture *> m_textureCache;
long m_textureMemUsed;
};
#endif