From 7a183cfa367db01413c001306741d06e1826d077 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 3 Aug 2012 05:16:52 +0200 Subject: might as well push all this. a massive amount of changes --- layoutgl/texturemanager.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 layoutgl/texturemanager.h (limited to 'layoutgl/texturemanager.h') diff --git a/layoutgl/texturemanager.h b/layoutgl/texturemanager.h new file mode 100644 index 0000000..07b7739 --- /dev/null +++ b/layoutgl/texturemanager.h @@ -0,0 +1,33 @@ +#ifndef TEXTUREMANAGER_H +#define TEXTUREMANAGER_H + +#include "wii/texpalette.h" +#include "lyt/layout.h" +#include +#include + +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 m_textures; + QHash 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 -- cgit v1.2.3