Hack around some calls that caused runtime exceptions when using Broadcom's VC IV driver

Note: VC IV is the old, binary driver. Still it'd be interesting to see how well this can be made to work with some recent JOGL work. Initial patch by xranby, conditionals by gohai.
This commit is contained in:
Xerxes Rånby
2015-07-27 17:33:12 +02:00
committed by gohai
parent 965e383b5d
commit 0b099e2de7
@@ -7042,9 +7042,15 @@ public class PGraphicsOpenGL extends PGraphics {
if (smooth < 1) {
pgl.disable(PGL.MULTISAMPLE);
} else {
pgl.enable(PGL.MULTISAMPLE);
// work around runtime exceptions in Broadcom's VC IV driver
if (false == OPENGL_RENDERER.equals("VideoCore IV HW")) {
pgl.enable(PGL.MULTISAMPLE);
}
}
// work around runtime exceptions in Broadcom's VC IV driver
if (false == OPENGL_RENDERER.equals("VideoCore IV HW")) {
pgl.disable(PGL.POLYGON_SMOOTH);
}
pgl.disable(PGL.POLYGON_SMOOTH);
if (sized) {
// reapplySettings();
@@ -7154,8 +7160,11 @@ public class PGraphicsOpenGL extends PGraphics {
pgl.getIntegerv(PGL.MAX_TEXTURE_SIZE, intBuffer);
maxTextureSize = intBuffer.get(0);
pgl.getIntegerv(PGL.MAX_SAMPLES, intBuffer);
maxSamples = intBuffer.get(0);
// work around runtime exceptions in Broadcom's VC IV driver
if (false == OPENGL_RENDERER.equals("VideoCore IV HW")) {
pgl.getIntegerv(PGL.MAX_SAMPLES, intBuffer);
maxSamples = intBuffer.get(0);
}
if (anisoSamplingSupported) {
pgl.getFloatv(PGL.MAX_TEXTURE_MAX_ANISOTROPY, floatBuffer);