* RenderState.copyMergedTo() now properly combines stencil state

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7582 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent dce2dd2eb1
commit 66bf6b20b9
  1. 22
      engine/src/core/com/jme3/material/RenderState.java

@ -1015,8 +1015,30 @@ public class RenderState implements Cloneable, Savable {
}
if (additionalState.applyStencilTest){
state.stencilTest = additionalState.stencilTest;
state.frontStencilStencilFailOperation = additionalState.frontStencilStencilFailOperation;
state.frontStencilDepthFailOperation = additionalState.frontStencilDepthFailOperation;
state.frontStencilDepthPassOperation = additionalState.frontStencilDepthPassOperation;
state.backStencilStencilFailOperation = additionalState.backStencilStencilFailOperation;
state.backStencilDepthFailOperation = additionalState.backStencilDepthFailOperation;
state.backStencilDepthPassOperation = additionalState.backStencilDepthPassOperation;
state.frontStencilFunction = additionalState.frontStencilFunction;
state.backStencilFunction = additionalState.backStencilFunction;
}else{
state.stencilTest = stencilTest;
state.frontStencilStencilFailOperation = frontStencilStencilFailOperation;
state.frontStencilDepthFailOperation = frontStencilDepthFailOperation;
state.frontStencilDepthPassOperation = frontStencilDepthPassOperation;
state.backStencilStencilFailOperation = backStencilStencilFailOperation;
state.backStencilDepthFailOperation = backStencilDepthFailOperation;
state.backStencilDepthPassOperation = backStencilDepthPassOperation;
state.frontStencilFunction = frontStencilFunction;
state.backStencilFunction = backStencilFunction;
}
return state;
}

Loading…
Cancel
Save