@Override
    public boolean equals(Object o) {
        if (o == null) {
            return false;
        }
        if (!(o instanceof RenderState)) {
            return false;
        }
        RenderState rs = (RenderState) o;

        if (wireframe != rs.wireframe) {
            return false;
        }

        if (cullMode != rs.cullMode) {
            return false;
        }

        if (depthWrite != rs.depthWrite) {
            return false;
        }

        if (depthTest != rs.depthTest) {
            return false;
        }
        if (depthTest) {
            if (depthFunc != rs.depthFunc) {
                return false;
            }
        }

        if (colorWrite != rs.colorWrite) {
            return false;
        }

        if (blendMode != rs.blendMode) {
            return false;
        }

        if (blendMode == BlendMode.Custom) {
            if (blendEquation != rs.blendEquation) {
                return false;
            }
            if (blendEquationAlpha != rs.blendEquationAlpha) {
                return false;
            }

            if (sfactorRGB != rs.sfactorRGB) {
                return false;
            }
            if (dfactorRGB != rs.dfactorRGB) {
                return false;
            }
            if (sfactorAlpha != rs.sfactorAlpha) {
                return false;
            }
            if (dfactorAlpha != rs.dfactorAlpha) {
                return false;
            }
        }

        if (offsetEnabled != rs.offsetEnabled) {
            return false;
        }

        if (offsetFactor != rs.offsetFactor) {
            return false;
        }

        if (offsetUnits != rs.offsetUnits) {
            return false;
        }

        if (stencilTest != rs.stencilTest) {
            return false;
        }

        if (stencilTest) {
            if (frontStencilStencilFailOperation != rs.frontStencilStencilFailOperation) {
                return false;
            }
            if (frontStencilDepthFailOperation != rs.frontStencilDepthFailOperation) {
                return false;
            }
            if (frontStencilDepthPassOperation != rs.frontStencilDepthPassOperation) {
                return false;
            }
            if (backStencilStencilFailOperation != rs.backStencilStencilFailOperation) {
                return false;
            }
            if (backStencilDepthFailOperation != rs.backStencilDepthFailOperation) {
                return false;
            }

            if (backStencilDepthPassOperation != rs.backStencilDepthPassOperation) {
                return false;
            }
            if (frontStencilFunction != rs.frontStencilFunction) {
                return false;
            }
            if (backStencilFunction != rs.backStencilFunction) {
                return false;
            }
            if (frontStencilMask != rs.frontStencilMask) {
                return false;
            }
            if (backStencilMask != rs.backStencilMask) {
                return false;
            }
            if (frontStencilReference != rs.frontStencilReference) {
                return false;
            }
            if (backStencilReference != rs.backStencilReference) {
                return false;
            }
        }

        if(lineWidth != rs.lineWidth){
            return false;
        }

        return true;
    }
Tests for equivalence with the argument. If {@code o} is null, false is
returned. Either way, the current instance is unaffected.

@param o the object to compare (may be null, unaffected)
@return true if {@code this} and {@code o} are equivalent,
    otherwise false
jme3-core/src/main/java/com/jme3/material/RenderState.java