summaryrefslogtreecommitdiff
path: root/layoutgl/texturemanager.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-12 14:57:44 +0200
committerTreeki <treeki@gmail.com>2012-09-12 14:57:44 +0200
commit3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10 (patch)
treed10e8cd4e462db28dd3c2f995905c4df57a20fed /layoutgl/texturemanager.cpp
parentbe8b56a7f0a8f6ba5456a099b61d032fd8aa2f61 (diff)
downloadLayoutStudio-3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10.tar.gz
LayoutStudio-3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10.zip
initial un-exporter version
Diffstat (limited to 'layoutgl/texturemanager.cpp')
-rw-r--r--layoutgl/texturemanager.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/layoutgl/texturemanager.cpp b/layoutgl/texturemanager.cpp
deleted file mode 100644
index 80a8186..0000000
--- a/layoutgl/texturemanager.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "texturemanager.h"
-
-LGLTextureManager::LGLTextureManager() {
-}
-
-void LGLTextureManager::setup(QGLWidget *gl, const LYTLayout *layout) {
- // TODO: code to cleanup previous stuff
-
- //m_gl = gl;
- m_layout = layout;
- m_package = &layout->package();
-
- QStringList textures = layout->generateTextureRefs();
-
- foreach (const QString &texName, textures) {
- qDebug() << texName;
-
- QByteArray tplData = m_package->getTexture(texName);
-
- QDataStream tplStream(tplData);
- WiiTexPalette tpl(tplStream);
-
- const QImage &image = tpl.textures.first().image;
- image.save(QString("tpl/%2__%1.png").arg(texName).arg((int)tpl.textures.first().format));
- // dirty, dirty hack, TODO: FIXME
- GLuint tex = gl->bindTexture(image, GL_TEXTURE_2D);
-
- m_textures.insert(texName, tex);
- m_images.insert(texName, image);
- }
-}