File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,6 +165,17 @@ public abstract class PGL {
165165 protected boolean usingFrontTex = false ;
166166 protected boolean needSepFrontTex = false ;
167167
168+ /**
169+ * Defines if FBO Layer is allowed in the given environment.
170+ * Using FBO can cause a fatal error during runtime for
171+ * Intel HD Graphics 3000 chipsets (commonly used on older MacBooks)
172+ * <a href="https://github.com/processing/processing/issues/4104">#4104</a>
173+ * The value remains as 'true' unless set false during init.
174+ * TODO There's already code in here to enable/disable the FBO properly,
175+ * this should be making use of that mechanism instead. [fry 191007]
176+ */
177+ protected boolean fboAllowed = true ;
178+
168179 // ........................................................
169180
170181 // Texture rendering
Original file line number Diff line number Diff line change 3636import java .io .FileInputStream ;
3737import java .io .IOException ;
3838import java .io .InputStream ;
39+ import java .lang .reflect .Method ;
3940import java .nio .ByteBuffer ;
4041import java .util .HashMap ;
4142import java .util .Map ;
@@ -178,6 +179,22 @@ protected void initDisplay() {
178179
179180 GraphicsConfiguration config = awtDisplayDevice .getDefaultConfiguration ();
180181 displayRect = config .getBounds ();
182+
183+ /** See explanation at {@link PGL#fboAllowed} in PGL */
184+ if (PApplet .platform == PConstants .MACOS ) {
185+ try {
186+ Class <?> cglClass = Class .forName ("sun.java2d.opengl.CGLGraphicsConfig" );
187+ Method cglMethod = cglClass .getMethod ("getContextCapabilities" );
188+ Class <?> ctcClass = Class .forName ("sun.java2d.pipe.hw.ContextCapabilities" );
189+ Method ctcMethod = ctcClass .getMethod ("getAdapterId" );
190+ Object cglInstance = cglClass .cast (config );
191+ Object ctcInstance = cglMethod .invoke (cglInstance );
192+ Object idInstance = ctcMethod .invoke (ctcInstance );
193+ if (String .valueOf (idInstance ).contains ("Intel HD Graphics 3000" )) {
194+ pgl .fboAllowed = false ;
195+ }
196+ } catch (Exception e ) { }
197+ }
181198 }
182199
183200
Original file line number Diff line number Diff line change 1- 0270 (3.5.4 or 3.6)
1+ 1270 (4.x alpha)
2+ X check for disabling FBO code (fixes Intel HD 3000)
3+ X https://github.com/processing/processing/issues/4104
4+ X https://github.com/processing/processing/pull/5881
5+
6+
27_ size() issues on Mojave? (3.4 works, 3.5.3 does not)
38_ https://github.com/processing/processing/issues/5791
49_ use exit event to set mouseY to 0 on macOS
@@ -11,12 +16,10 @@ _ simple rotateZ() fix
1116_ https://github.com/processing/processing/pull/5821
1217_ https://github.com/processing/processing/issues/5770
1318
14- _ check for disabling FBO code (fixes Intel HD 3000)
15- _ https://github.com/processing/processing/issues/4104
16- _ https://github.com/processing/processing/pull/5881
17-
1819
1920high-ish
21+ _ Update isAccessible() in Table to use JDK 11 reflection methods
22+ _ https://github.com/processing/processing4/issues/3
2023_ add separator option to loadTable()
2124_ https://github.com/processing/processing/issues/5068
2225_ make setting the window icon automatic, based on files in local dirs
Original file line number Diff line number Diff line change 1- 0270 (4.x)
1+ 1270 (4.x alpha )
22X use ctrl-page up/down for tabs on Windows
33X https://github.com/processing/processing/issues/5794
44X fix potential highlighting issue that wasn't selecting portions of text
You can’t perform that action at this time.
0 commit comments