avoids creating iterators, accesses param's backing array directly for greater performance
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11011 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
7bb046730f
commit
77a2af25c4
@ -34,9 +34,9 @@ package com.jme3.shader;
|
||||
import com.jme3.export.*;
|
||||
import com.jme3.material.MatParam;
|
||||
import com.jme3.material.TechniqueDef;
|
||||
import com.jme3.util.ListMap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
@ -182,11 +182,12 @@ public class DefineList implements Savable, Cloneable {
|
||||
return defines.equals(other.defines);
|
||||
}
|
||||
|
||||
public boolean equalsParams(Collection<MatParam> params, TechniqueDef def) {
|
||||
|
||||
public boolean equalsParams(ListMap params, TechniqueDef def) {
|
||||
|
||||
int size = 0;
|
||||
|
||||
for (MatParam param : params) {
|
||||
for(int i = 0; i < params.size() ; i++ ) {
|
||||
MatParam param = (MatParam)params.getValue(i);
|
||||
String key = def.getShaderParamDefine(param.getName());
|
||||
if (key != null) {
|
||||
Object val = param.getValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user