private void updateRenderState(Geometry geometry, RenderManager renderManager, Renderer renderer, TechniqueDef techniqueDef) {
        RenderState finalRenderState;
        if (renderManager.getForcedRenderState() != null) {
            finalRenderState = mergedRenderState.copyFrom(renderManager.getForcedRenderState());
        } else if (techniqueDef.getRenderState() != null) {
            finalRenderState = mergedRenderState.copyFrom(RenderState.DEFAULT);
            finalRenderState = techniqueDef.getRenderState().copyMergedTo(additionalState, finalRenderState);
        } else {
            finalRenderState = mergedRenderState.copyFrom(RenderState.DEFAULT);
            finalRenderState = RenderState.DEFAULT.copyMergedTo(additionalState, finalRenderState);
        }
        // test if the face cull mode should be flipped before render
        if (finalRenderState.isFaceCullFlippable() && isNormalsBackward(geometry.getWorldScale())) {
            finalRenderState.flipFaceCull();
        }
        renderer.applyRenderState(finalRenderState);
    }
Select the technique to use for rendering this material.
<p>
Any candidate technique for selection (either default or named)
must be verified to be compatible with the system, for that, the
<code>renderManager</code> is queried for capabilities.

@param name The name of the technique to select, pass
{@link TechniqueDef#DEFAULT_TECHNIQUE_NAME} to select one of the default
techniques.
@param renderManager The {@link RenderManager render manager}
to query for capabilities.

@throws IllegalArgumentException If no technique exists with the given
name.
@throws UnsupportedOperationException If no candidate technique supports
the system capabilities.
jme3-core/src/main/java/com/jme3/material/Material.java