From e77ec838b25da1b732365cca425bac3e88eb4491 Mon Sep 17 00:00:00 2001 From: gohai Date: Thu, 20 Apr 2017 11:43:51 +0200 Subject: [PATCH] Unblock hardware-accelerated P3D on ARM Mali devices This works around a JOGL bug that affects ARM Mali devices, such as the PocketCHIP. (reported by @xranby) --- core/src/processing/opengl/PSurfaceJOGL.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index b314ad451..e653b213f 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -273,6 +273,15 @@ public class PSurfaceJOGL implements PSurface { } else if (PJOGL.profile == 2) { try { profile = GLProfile.getGL2ES2(); + + // workaround for https://jogamp.org/bugzilla/show_bug.cgi?id=1347 + if (!profile.isHardwareRasterizer()) { + GLProfile hardware = GLProfile.getMaxProgrammable(true); + if (hardware.isGL2ES2()) { + profile = hardware; + } + } + } catch (GLException ex) { profile = GLProfile.getMaxProgrammable(true); }