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)
This commit is contained in:
gohai
2017-04-20 11:43:51 +02:00
parent b9d907a145
commit e77ec838b2
@@ -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);
}