/** * Will reload the filter's materials whenever the shader file is changed * on the hard drive * @param shaderName the shader name (relative path to the asset folder or * to a registered asset path) * @param filter the filter to reload */ public void registerBinding(String shaderName, final Filter filter) { registerBinding(new FileChangedTrigger(shaderName), filter); }
/** * Will reload the spatials's materials whenever the shader file is changed * on the hard drive * @param shaderName the shader name (relative path to the asset folder or * to a registered asset path) * @param spat the spatial to reload */ public void registerBinding(String shaderName, final Spatial spat) { registerBinding(new FileChangedTrigger(shaderName), spat); }
/** * Will reload the spatial's materials whenever the trigger is fired * @param trigger the trigger * @param spat the spatial to reload */ public void registerBinding(Trigger trigger, final Spatial spat) { if(spat instanceof Geometry){ GeometryBinding binding = new GeometryBinding(trigger, (Geometry)spat); bindings.add(binding); if (isInitialized()) { bind(binding); } }else if (spat instanceof Node){ for (Spatial child : ((Node)spat).getChildren()) { registerBinding(trigger, child); } } }
debug.registerBinding("Common/MatDefs/Light/PBRLighting.frag", rootNode); debug.registerBinding("Common/ShaderLib/PBR.glsllib", rootNode); getStateManager().attach(debug);
debug.registerBinding("Common/ShaderLib/BlinnPhongLighting.glsllib", teapot); stateManager.attach(debug); setPauseOnLostFocus(false);
/** * Will reload the filter's materials whenever the shader file is changed * on the hard drive * @param shaderName the shader name (relative path to the asset folder or * to a registered asset path) * @param filter the filter to reload */ public void registerBinding(String shaderName, final Filter filter) { registerBinding(new FileChangedTrigger(shaderName), filter); }
/** * Will reload the spatials's materials whenever the shader file is changed * on the hard drive * @param shaderName the shader name (relative path to the asset folder or * to a registered asset path) * @param spat the spatial to reload */ public void registerBinding(String shaderName, final Spatial spat) { registerBinding(new FileChangedTrigger(shaderName), spat); }
/** * Will reload the spatial's materials whenever the trigger is fired * @param trigger the trigger * @param spat the spatial to reload */ public void registerBinding(Trigger trigger, final Spatial spat) { if(spat instanceof Geometry){ GeometryBinding binding = new GeometryBinding(trigger, (Geometry)spat); bindings.add(binding); if (isInitialized()) { bind(binding); } }else if (spat instanceof Node){ for (Spatial child : ((Node)spat).getChildren()) { registerBinding(trigger, child); } } }