blob: 07b773951e89ba4278b5a112f32091996dddac7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef TEXTUREMANAGER_H
#define TEXTUREMANAGER_H
#include "wii/texpalette.h"
#include "lyt/layout.h"
#include <QGLContext>
#include <QHash>
class LGLTextureManager {
public:
LGLTextureManager();
void setup(QGLWidget *gl, const LYTLayout *layout);
private:
const QGLContext *m_gl;
const LYTLayout *m_layout;
const LYTPackageBase *m_package;
QHash<QString, GLuint> m_textures;
QHash<QString, QImage> m_images;
public:
GLuint glTextureForName(const QString name) const {
return m_textures.value(name);
}
QImage imageForName(const QString name) const {
return m_images.value(name);
}
};
#endif // TEXTUREMANAGER_H
|