SceneWorker.addWorker(new WorkCommit() {
public void commit() {
try {
RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
GLSLShaderObjectsState shaderState = (GLSLShaderObjectsState)rm.createRendererState(StateType.GLSLShaderObjects);
shaderState.setEnabled(true);
shaderState.load(vertex, fragment);
if (binder != null) {
binder.bind(shaderState);
}
shaderState.apply();
} catch (GLException ex) {
logger.log(Level.WARNING, "Unable to load avatar sample " +
"shader. High quality avatars are not available.",
ex);
out.value = false;