diff --git a/android/core/src/processing/opengl/PGraphicsOpenGL.java b/android/core/src/processing/opengl/PGraphicsOpenGL.java index 474a38a27..6be51caff 100644 --- a/android/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/android/core/src/processing/opengl/PGraphicsOpenGL.java @@ -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; } diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 474a38a27..6be51caff 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -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; }