Skip to content

Commit

Permalink
fixed multiple texture bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ponchio committed May 2, 2017
1 parent cce89a6 commit cc641f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nxsbuild/texpyramid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit cc641f7

Please sign in to comment.