mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Unwrap GLExceptions to show only the causing exception
This commit is contained in:
+1
-1
@@ -1,6 +1,7 @@
|
||||
0208 opengl
|
||||
X Make methods in PGL used by opengl protected, then remove gl from the public GL methods
|
||||
X Texture wrapping option in PGraphics: textureWrap(mode)
|
||||
X Unwrap GLException to avoid confusion when common, non-GL errors occur.
|
||||
|
||||
0208 video
|
||||
X Cleanup video API:
|
||||
@@ -13,7 +14,6 @@ API changes/additions (for beta release)
|
||||
_ Add DISABLE_PERSPECTIVE_CORRECTED_STROKE hint, remove DISABLE_PERSPECTIVE_CORRECTED_LINES
|
||||
_ Rename shader constants (FLAT, LIT, TEXTURED, etc), resetShader() w/out args?
|
||||
_ Back-buffer support in shaders: http://code.google.com/p/processing/issues/detail?id=1169
|
||||
_ Unwrap GLException to avoid confusion when common, non-GL errors occur.
|
||||
|
||||
processing-core todo (after beta):
|
||||
_ Cleaner Implementation of PImage.loadPixels()
|
||||
|
||||
@@ -44,6 +44,7 @@ import javax.media.opengl.GLCapabilitiesImmutable;
|
||||
import javax.media.opengl.GLContext;
|
||||
import javax.media.opengl.GLDrawable;
|
||||
import javax.media.opengl.GLEventListener;
|
||||
import javax.media.opengl.GLException;
|
||||
import javax.media.opengl.GLProfile;
|
||||
import javax.media.opengl.awt.GLCanvas;
|
||||
import javax.media.opengl.glu.GLU;
|
||||
@@ -914,14 +915,19 @@ public class PGL {
|
||||
|
||||
protected void requestDraw() {
|
||||
if (initialized) {
|
||||
//animator.requestDisplay();
|
||||
|
||||
if (toolkit == AWT) {
|
||||
canvasAWT.display();
|
||||
} else if (toolkit == NEWT) {
|
||||
animator.requestDisplay();
|
||||
try {
|
||||
//animator.requestDisplay();
|
||||
if (toolkit == AWT) {
|
||||
canvasAWT.display();
|
||||
} else if (toolkit == NEWT) {
|
||||
animator.requestDisplay();
|
||||
}
|
||||
} catch (GLException e) {
|
||||
// Unwrap GLException to only the causing exception and so
|
||||
// avoid the additional jogl lines.
|
||||
Throwable tr = e.getCause();
|
||||
throw (RuntimeException)tr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user