mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 05:39:18 +01:00
force loadPixels() in PGraphicsOpenGL.initCache(), otherwise textures are not initialized properly in android
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user