@Override
    public void setShader(Shader shader) {
        if (shader == null) {
            throw new IllegalArgumentException("Shader cannot be null");
        } else {            
            if (shader.isUpdateNeeded()) {
                updateShaderData(shader);
            }

            // NOTE: might want to check if any of the
            // sources need an update?

            assert shader.getId() > 0;

            updateShaderUniforms(shader);
            updateShaderBufferBlocks(shader);
            bindProgram(shader);
        }
    }
Updates all shader's buffer blocks.

@param shader the shader.
jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java