From cc641f71cd34757d23924386d3521a5a9fb3f9b1 Mon Sep 17 00:00:00 2001 From: Federico Ponchio Date: Tue, 2 May 2017 16:52:39 +0200 Subject: [PATCH] fixed multiple texture bug --- src/nxsbuild/texpyramid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nxsbuild/texpyramid.cpp b/src/nxsbuild/texpyramid.cpp index 9fd4ece..1b69ad5 100644 --- a/src/nxsbuild/texpyramid.cpp +++ b/src/nxsbuild/texpyramid.cpp @@ -88,6 +88,7 @@ QImage TexLevel::read(QRect region) { void TexLevel::build(TexLevel &parent) { int side = collection->side; float scale = collection->scale; + tex = parent.tex; width = floor(parent.width * scale); height = floor(parent.height * scale); @@ -152,7 +153,7 @@ QImage TexAtlas::read(int tex, int level, QRect region) { } void TexAtlas::addImg(Index index, QImage img) { - cout << "Adding: " << index.level << " " << index.index << endl; +// cout << "Adding: tex: " << index.tex << " level: " << index.level << " index: " << index.index << endl; cache_size += img.width()*img.height()*4; ram[index] = RamData(img, access++); pruneCache();