important fix, texture manager
This commit is contained in:
@@ -29,7 +29,9 @@
|
||||
#include <QOpenGLExtraFunctions>
|
||||
|
||||
|
||||
class QGLENGINE_CORE_EXPORT TextureManager {
|
||||
class QGLENGINE_CORE_EXPORT TextureManager: public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TextureManager(QOpenGLExtraFunctions * f_): f(f_) {}
|
||||
virtual ~TextureManager() {}
|
||||
@@ -50,12 +52,15 @@ public:
|
||||
int texturesCount() const { return cache_image.size(); }
|
||||
uint texturesHash() const { return qHash(cache_image.keys()); }
|
||||
void clearImageCache();
|
||||
void clearMissed();
|
||||
const QSet<QString> & missedFiles() const { return missed; }
|
||||
|
||||
void loadToTexture2DArray(Texture2DArray * array, QSize map_size);
|
||||
|
||||
static void addSearchPath(const QString & path);
|
||||
static void clearSearchPathes() { search_pathes.clear(); }
|
||||
static QStringList searchPathes() { return search_pathes; }
|
||||
static void setSearchPathes(const QStringList & pl) { search_pathes = pl; }
|
||||
static QString findFile(const QString & path);
|
||||
|
||||
protected:
|
||||
@@ -69,7 +74,12 @@ protected:
|
||||
QMap<uint, GLuint> cache_loaded;
|
||||
QMap<uint, QImage> cache_image;
|
||||
QMap<uint, int> array_layers;
|
||||
QSet<QString> missed;
|
||||
QStringList tex_pathes;
|
||||
|
||||
signals:
|
||||
void loadingDone();
|
||||
void filesUsed(int);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user