mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user