syntax error fixes

experimental^2^2
Kirill Vainer 9 years ago
parent 0f1c35c5f0
commit 80af02e1f3
  1. 2
      jme3-core/src/main/java/com/jme3/material/DefaultTechniqueDefLogic.java
  2. 4
      jme3-core/src/main/java/com/jme3/material/Material.java
  3. 4
      jme3-core/src/main/java/com/jme3/material/SinglePassLightingLogic.java
  4. 4
      jme3-core/src/main/java/com/jme3/material/Technique.java
  5. 4
      jme3-core/src/main/java/com/jme3/material/TechniqueDefLogic.java
  6. 6
      jme3-core/src/main/java/com/jme3/renderer/RenderManager.java

@ -56,7 +56,7 @@ public class DefaultTechniqueDefLogic implements TechniqueDefLogic {
@Override
public Shader makeCurrent(AssetManager assetManager, RenderManager renderManager,
EnumSet<Caps> rendererCaps, DefineList defines) {
EnumSet<Caps> rendererCaps, LightList lights, DefineList defines) {
return techniqueDef.getShader(assetManager, rendererCaps, defines);
}

@ -834,7 +834,7 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
return;
}
Shader shader = technique.makeCurrent(renderManager, rendererCaps);
Shader shader = technique.makeCurrent(renderManager, null, rendererCaps);
updateShaderMaterialParameters(renderer, shader);
renderManager.getRenderer().setShader(shader);
}
@ -939,7 +939,7 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
updateRenderState(renderManager, renderer, techniqueDef);
// Select shader to use
Shader shader = technique.makeCurrent(renderManager, rendererCaps);
Shader shader = technique.makeCurrent(renderManager, lights, rendererCaps);
// Begin tracking which uniforms were changed by material.
clearUniformsSetByCurrent(shader);

@ -76,10 +76,10 @@ public final class SinglePassLightingLogic extends DefaultTechniqueDefLogic {
@Override
public Shader makeCurrent(AssetManager assetManager, RenderManager renderManager,
EnumSet<Caps> rendererCaps, DefineList defines) {
EnumSet<Caps> rendererCaps, LightList lights, DefineList defines) {
defines.set(nbLightsDefineId, renderManager.getSinglePassLightBatchSize() * 3);
defines.set(singlePassLightingDefineId, true);
return super.makeCurrent(assetManager, renderManager, rendererCaps, defines);
return super.makeCurrent(assetManager, renderManager, rendererCaps, lights, defines);
}
/**

@ -131,10 +131,10 @@ public final class Technique {
* @param rendererCaps The renderer capabilities which the shader should support.
* @return A compatible shader.
*/
Shader makeCurrent(RenderManager renderManager, EnumSet<Caps> rendererCaps) {
Shader makeCurrent(RenderManager renderManager, LightList lights, EnumSet<Caps> rendererCaps) {
TechniqueDefLogic logic = def.getLogic();
AssetManager assetManager = owner.getMaterialDef().getAssetManager();
return logic.makeCurrent(assetManager, renderManager, rendererCaps, dynamicDefines);
return logic.makeCurrent(assetManager, renderManager, rendererCaps, lights, dynamicDefines);
}
/**

@ -66,6 +66,8 @@ public interface TechniqueDefLogic {
* @param renderManager The render manager for which rendering is to be performed.
* @param rendererCaps Renderer capabilities. The returned shader must
* support these capabilities.
* @param lights The lights with which the geometry shall be rendered. This
* list must not include culled lights.
* @param defines The define list used by the technique, any
* {@link TechniqueDef#addShaderUnmappedDefine(java.lang.String) unmapped defines}
* should be set here to change shader behavior.
@ -73,7 +75,7 @@ public interface TechniqueDefLogic {
* @return The shader to use for rendering.
*/
public Shader makeCurrent(AssetManager assetManager, RenderManager renderManager,
EnumSet<Caps> rendererCaps, DefineList defines);
EnumSet<Caps> rendererCaps, LightList lights, DefineList defines);
/**
* Requests that the <code>TechniqueDefLogic</code> renders the given geometry.

@ -49,7 +49,7 @@ import com.jme3.renderer.queue.RenderQueue;
import com.jme3.renderer.queue.RenderQueue.Bucket;
import com.jme3.renderer.queue.RenderQueue.ShadowMode;
import com.jme3.scene.*;
import com.jme3.shader.Uniform;
import com.jme3.shader.Shader;
import com.jme3.shader.UniformBinding;
import com.jme3.shader.UniformBindingManager;
import com.jme3.system.NullRenderer;
@ -483,8 +483,8 @@ public class RenderManager {
* Updates the given list of uniforms with {@link UniformBinding uniform bindings}
* based on the current world state.
*/
public void updateUniformBindings(List<Uniform> params) {
uniformBindingManager.updateUniformBindings(params);
public void updateUniformBindings(Shader shader) {
uniformBindingManager.updateUniformBindings(shader);
}
/**

Loading…
Cancel
Save