diff options
author | Julien Gouesse <[email protected]> | 2014-08-15 22:55:14 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-08-15 22:55:14 +0200 |
commit | 11162f99d93ca65692ea3f645a1d0a99b7d9327a (patch) | |
tree | 57fc274fb99233ab30f3fddb29b6e3ccb829466f /ardor3d-jogl/src/main | |
parent | 17980a4b185e997809f31cd254dbd938e22c0b6d (diff) |
Drives the OpenGL-ES code path more robust when setting the shading model
Diffstat (limited to 'ardor3d-jogl/src/main')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShadingStateUtil.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShadingStateUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShadingStateUtil.java index 426befb..44852a8 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShadingStateUtil.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShadingStateUtil.java @@ -36,7 +36,9 @@ public abstract class JoglShadingStateUtil { final int toApply = state.isEnabled() ? getGLShade(state.getShadingMode()) : GLLightingFunc.GL_SMOOTH; // only apply if we're different. Update record to reflect any changes. if (!record.isValid() || toApply != record.lastShade) { - gl.getGL2().glShadeModel(toApply); + if (gl.isGL2ES1()) { + gl.getGL2ES1().glShadeModel(toApply); + } record.lastShade = toApply; } |