For the cases where a define has not actually

changed, don't reload the shader.  This prevents
a lot of extra work from being done.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9139 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
PSp..om 13 years ago
parent 1f0a77de26
commit 65f8dbf6ae
  1. 6
      engine/src/core/com/jme3/material/Technique.java

@ -114,8 +114,7 @@ public class Technique implements Savable {
void notifySetParam(String paramName, VarType type, Object value) {
String defineName = def.getShaderParamDefine(paramName);
if (defineName != null) {
defines.set(defineName, type, value);
needReload = true;
needReload = defines.set(defineName, type, value);
}
if (shader != null) {
updateUniformParam(paramName, type, value);
@ -128,8 +127,7 @@ public class Technique implements Savable {
void notifyClearParam(String paramName) {
String defineName = def.getShaderParamDefine(paramName);
if (defineName != null) {
defines.remove(defineName);
needReload = true;
needReload = defines.remove(defineName);
}
if (shader != null) {
if (!paramName.startsWith("m_")) {

Loading…
Cancel
Save