Files
BlitzNext/Runtime/blitz3d/cachedtexture.hpp
T

37 lines
787 B
C++
Raw Normal View History

2014-01-31 08:23:00 +13:00
#ifndef CACHEDTEXTURE_H
#define CACHEDTEXTURE_H
2019-01-18 17:04:17 +01:00
#include "gxcanvas.hpp"
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
class CachedTextureFactory {
public:
CachedTextureFactory(int w, int h, int flags, int cnt);
CachedTextureFactory(const string& f, int flags, int w, int h, int first, int cnt);
CachedTextureFactory(const CachedTextureFactory& t);
~CachedTextureFactory();
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
CachedTextureFactory& operator=(const CachedTextureFactory& t);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
string getName() const;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
const vector<gxCanvas*>& getFrames() const;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
bool operator<(const CachedTextureFactory& t) const
{
return rep < t.rep;
}
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
static void setPath(const string& t);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
private:
struct CachedTexture;
2019-01-18 17:04:17 +01:00
CachedTexture* rep;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
CachedTexture* findRep(const string& f, int flags, int w, int h, int first, int cnt);
2014-01-31 08:23:00 +13:00
static set<CachedTexture*> rep_set;
2014-01-31 08:23:00 +13:00
};
#endif