Skip to content

Commit f167d50

Browse files
committed
Merge pull request processing#4524 from gohai/arm-updates
Fix GLExceptions on Raspberry Pi when using offscreen PGraphics
2 parents 7ae3f57 + e743f5b commit f167d50

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

core/src/processing/opengl/PGraphicsOpenGL.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,9 +1607,12 @@ protected void restoreGL() {
16071607
}
16081608
pgl.depthFunc(PGL.LEQUAL);
16091609

1610-
if (smooth < 1) {
1610+
if (OPENGL_RENDERER.equals("VideoCore IV HW")) {
1611+
// Broadcom's VC IV driver is unhappy with either of these
1612+
// ignore for now
1613+
} else if (smooth < 1) {
16111614
pgl.disable(PGL.MULTISAMPLE);
1612-
} else {
1615+
} else if (1 <= smooth) {
16131616
pgl.enable(PGL.MULTISAMPLE);
16141617
pgl.disable(PGL.POLYGON_SMOOTH);
16151618
}
@@ -6788,13 +6791,13 @@ protected void setGLSettings() {
67886791
// quality = temp;
67896792
// }
67906793
}
6791-
if (smooth < 1) {
6794+
if (OPENGL_RENDERER.equals("VideoCore IV HW")) {
6795+
// Broadcom's VC IV driver is unhappy with either of these
6796+
// ignore for now
6797+
} else if (smooth < 1) {
67926798
pgl.disable(PGL.MULTISAMPLE);
6793-
} else {
6794-
// work around runtime exceptions in Broadcom's VC IV driver
6795-
if (false == OPENGL_RENDERER.equals("VideoCore IV HW")) {
6796-
pgl.enable(PGL.MULTISAMPLE);
6797-
}
6799+
} else if (1 <= smooth) {
6800+
pgl.enable(PGL.MULTISAMPLE);
67986801
}
67996802
// work around runtime exceptions in Broadcom's VC IV driver
68006803
if (false == OPENGL_RENDERER.equals("VideoCore IV HW")) {

0 commit comments

Comments
 (0)