diff options
author | Julien Gouesse <[email protected]> | 2015-10-30 21:24:04 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2015-10-30 21:24:04 +0100 |
commit | 2c510f660483077dc419dc79b19f85608ba58283 (patch) | |
tree | 4d256c3fa65fdaa81bb3cf274f848d8b13ef530d | |
parent | a0bbf1e95492cd651efeba129494bb14622da764 (diff) |
Disables the use of GLSL in GLJPanel used in JoglSwingCanvas as it caused too much troubles with other GLSL shaders and the wireframe state
-rw-r--r-- | ardor3d-jogl-awt/src/main/java/com/ardor3d/framework/jogl/awt/JoglSwingCanvas.java | 5 | ||||
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/ardor3d-jogl-awt/src/main/java/com/ardor3d/framework/jogl/awt/JoglSwingCanvas.java b/ardor3d-jogl-awt/src/main/java/com/ardor3d/framework/jogl/awt/JoglSwingCanvas.java index c924a35..e70e6e8 100644 --- a/ardor3d-jogl-awt/src/main/java/com/ardor3d/framework/jogl/awt/JoglSwingCanvas.java +++ b/ardor3d-jogl-awt/src/main/java/com/ardor3d/framework/jogl/awt/JoglSwingCanvas.java @@ -31,12 +31,9 @@ import com.jogamp.opengl.awt.GLJPanel; * the AWT input system directly and its abstraction in Ardor3D (com.ardor3d.input.awt). As this canvas is generally * slower and heavier (in term of memory footprint) than JoglAwtCanvas, use it if and only if you have some problems * when mixing heavyweight and lightweight components. - * - * N.B: This canvas uses GLSL internally when it is available and supported, setting the property jogl.gljpanel.noglsl - * to true is recommended to avoid any conflicts with the effects based on GLSL including the bloom effect. */ public class JoglSwingCanvas extends GLJPanel implements Canvas { - + private static final long serialVersionUID = 1L; private final JoglCanvasRenderer _canvasRenderer; diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java index 4410604..847c15e 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java @@ -20,6 +20,12 @@ import com.jogamp.opengl.GLProfile; public class CapsUtil { + static { + // The GLSL mode of GLJPanel used in JoglSwingCanvas seems to cause a lot of troubles when using our own GLSL + // shaders and with the wireframe state. Therefore, it is disabled as early as possible + System.setProperty("jogl.gljpanel.noglsl", "true"); + } + public GLProfile getProfile() { // tries to get the most capable profile, programmable or fixed, desktop or embedded, forward or backward // compatible |