Fixed an index error in FontTexture (issue #1308)

This commit is contained in:
codeanticode
2012-11-26 23:02:37 +00:00
parent 7101bc1eb2
commit c2d84d77ef

View File

@@ -159,14 +159,14 @@ class FontTexture implements PConstants {
currentTex = textures.length - 1;
PImage[] tempImg = images;
images = new PImage[textures.length + 1];
images = new PImage[textures.length];
PApplet.arrayCopy(tempImg, images, tempImg.length);
images[tempImg.length] = pg.wrapTexture(tex);
}
lastTex = currentTex;
// Make sure that the current texture is bound.
//tex.bind();
tex.bind();
return resize;
}
@@ -324,14 +324,6 @@ class FontTexture implements PConstants {
}
}
if (lastTex == -1) {
lastTex = 0;
}
if (currentTex != lastTex || resized) {
currentTex = idx;
}
TextureInfo tinfo = new TextureInfo(currentTex, offsetX, offsetY,
w, h, rgba);
offsetX += w;