force loadPixels() in PGraphicsOpenGL.initCache(), otherwise textures are not initialized properly in android

This commit is contained in:
codeanticode
2012-07-28 22:10:42 +00:00
parent 14526420f6
commit e187335bdc
2 changed files with 4 additions and 6 deletions

View File

@@ -5548,9 +5548,8 @@ public class PGraphicsOpenGL extends PGraphics {
Texture tex = (Texture)img.getCache(pgPrimary);
if (tex == null || tex.contextIsOutdated()) {
tex = addTexture(img);
if (img.pixels != null) {
tex.set(img.pixels);
}
img.loadPixels();
tex.set(img.pixels);
}
return tex;
}