public void set(RenderState state) {
        wireframe = state.wireframe;
        cullMode = state.cullMode;
        depthWrite = state.depthWrite;
        depthTest = state.depthTest;
        colorWrite = state.colorWrite;
        blendMode = state.blendMode;
        offsetEnabled = state.offsetEnabled;
        offsetFactor = state.offsetFactor;
        offsetUnits = state.offsetUnits;
        stencilTest = state.stencilTest;
        frontStencilStencilFailOperation = state.frontStencilStencilFailOperation;
        frontStencilDepthFailOperation = state.frontStencilDepthFailOperation;
        frontStencilDepthPassOperation = state.frontStencilDepthPassOperation;
        backStencilStencilFailOperation = state.backStencilStencilFailOperation;
        backStencilDepthFailOperation = state.backStencilDepthFailOperation;
        backStencilDepthPassOperation = state.backStencilDepthPassOperation;
        frontStencilFunction = state.frontStencilFunction;
        backStencilFunction = state.backStencilFunction;
        frontStencilMask = state.frontStencilMask;
        frontStencilReference = state.frontStencilReference;
        backStencilMask = state.backStencilMask;
        backStencilReference = state.backStencilReference;
        blendEquationAlpha = state.blendEquationAlpha;
        blendEquation = state.blendEquation;
        depthFunc = state.depthFunc;
        lineWidth = state.lineWidth;

        applyWireFrame =  true;
        applyCullMode =  true;
        applyDepthWrite =  true;
        applyDepthTest =  true;
        applyColorWrite = true;
        applyBlendMode = true;
        applyPolyOffset =  true;
        applyDepthFunc = true;
        applyLineWidth = true;
        
        sfactorRGB = state.sfactorRGB;
        dfactorRGB = state.dfactorRGB;
        sfactorAlpha = state.sfactorAlpha;
        dfactorAlpha = state.dfactorAlpha;
    }
Merges <code>this</code> state and <code>additionalState</code> into
the parameter <code>state</code> based on a specific criteria.

<p>The criteria for this merge is the following:<br>
For every given property, such as alpha test or depth write, check
if it was modified from the original in the <code>additionalState</code>
if it was modified, then copy the property from the <code>additionalState</code>
into the parameter <code>state</code>, otherwise, copy the property from <code>this</code>
into the parameter <code>state</code>. If <code>additionalState</code>
is <code>null</code>, then no modifications are made and <code>this</code> is returned,
otherwise, the parameter <code>state</code> is returned with the result
of the merge.

@param additionalState The <code>additionalState</code>, from which data is taken only
if it was modified by the user.
@param state Contains output of the method if <code>additionalState</code>
is not null.
@return <code>state</code> if <code>additionalState</code> is non-null,
otherwise returns <code>this</code>
jme3-core/src/main/java/com/jme3/material/RenderState.java