diff options
author | Julien Gouesse <[email protected]> | 2014-08-15 21:43:31 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-08-15 21:43:31 +0200 |
commit | 1d1f808cb6bb399d2569a3ab2bcfc73da59ea6c4 (patch) | |
tree | 40efdc11dbccbb910a2a99b65c856c99b94b8fee /ardor3d-jogl/src/main/java/com | |
parent | da7ffb486384319fcab9a5fedde0e2daeb1d2b30 (diff) |
Drives the OpenGL-ES code path more robust, especially when dealing with the stencils
Diffstat (limited to 'ardor3d-jogl/src/main/java/com')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglStencilStateUtil.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglStencilStateUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglStencilStateUtil.java index d624b60..c027d0b 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglStencilStateUtil.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglStencilStateUtil.java @@ -38,7 +38,9 @@ public abstract class JoglStencilStateUtil { setEnabled(state.isEnabled(), caps.isTwoSidedStencilSupported() ? state.isUseTwoSided() : false, record, caps); if (state.isEnabled()) { if (state.isUseTwoSided() && caps.isTwoSidedStencilSupported()) { - gl.getGL2().glActiveStencilFaceEXT(GL.GL_BACK); + if (gl.isGL2()) { + gl.getGL2().glActiveStencilFaceEXT(GL.GL_BACK); + } applyMask(state.getStencilWriteMaskBack(), record, 2); applyFunc(getGLStencilFunction(state.getStencilFunctionBack()), state.getStencilReferenceBack(), state.getStencilFuncMaskBack(), record, 2); @@ -46,7 +48,9 @@ public abstract class JoglStencilStateUtil { getGLStencilOp(state.getStencilOpZFailBack(), caps), getGLStencilOp(state.getStencilOpZPassBack(), caps), record, 2); - gl.getGL2().glActiveStencilFaceEXT(GL.GL_FRONT); + if (gl.isGL2()) { + gl.getGL2().glActiveStencilFaceEXT(GL.GL_FRONT); + } applyMask(state.getStencilWriteMaskFront(), record, 1); applyFunc(getGLStencilFunction(state.getStencilFunctionFront()), state.getStencilReferenceFront(), state.getStencilFuncMaskFront(), record, 1); |