private void updateShaderMaterialParameter(Renderer renderer, VarType type, Shader shader, MatParam param, BindUnits unit, boolean override) {
        if (type == VarType.UniformBufferObject || type == VarType.ShaderStorageBufferObject) {
            ShaderBufferBlock bufferBlock = shader.getBufferBlock(param.getPrefixedName());
            BufferObject bufferObject = (BufferObject) param.getValue();

            ShaderBufferBlock.BufferType btype;
            if (type == VarType.ShaderStorageBufferObject) {
                btype = ShaderBufferBlock.BufferType.ShaderStorageBufferObject;
                bufferBlock.setBufferObject(btype, bufferObject);
                renderer.setShaderStorageBufferObject(unit.bufferUnit, bufferObject); // TODO: probably not needed
            } else {
                btype = ShaderBufferBlock.BufferType.UniformBufferObject;
                bufferBlock.setBufferObject(btype, bufferObject);
                renderer.setUniformBufferObject(unit.bufferUnit, bufferObject); // TODO: probably not needed
            }
            unit.bufferUnit++;
        } else {
            Uniform uniform = shader.getUniform(param.getPrefixedName());
            if (!override && uniform.isSetByCurrentMaterial())
                return;

            if (type.isTextureType() || type.isImageType()) {
                try {
                    if (type.isTextureType()) {
                        renderer.setTexture(unit.textureUnit, (Texture) param.getValue());
                    } else {
                        renderer.setTextureImage(unit.textureUnit, (TextureImage) param.getValue());
                    }
                } catch (TextureUnitException ex) {
                    int numTexParams = unit.textureUnit + 1;
                    String message = "Too many texture parameters (" + numTexParams + ") assigned\n to " + this.toString();
                    throw new IllegalStateException(message);
                }
                uniform.setValue(VarType.Int, unit.textureUnit);
                unit.textureUnit++;
            } else {
                uniform.setValue(type, param.getValue());
            }
        }
    }
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