update method
Implementation
WebGLShaderCache update(Material material) {
var vertexShader = material.vertexShader;
var fragmentShader = material.fragmentShader;
var vertexShaderStage = _getShaderStage(vertexShader!);
var fragmentShaderStage = _getShaderStage(fragmentShader!);
var materialShaders = _getShaderCacheForMaterial(material);
if (materialShaders.contains(vertexShaderStage) == false) {
materialShaders.add(vertexShaderStage);
vertexShaderStage.usedTimes++;
}
if (materialShaders.contains(fragmentShaderStage) == false) {
materialShaders.add(fragmentShaderStage);
fragmentShaderStage.usedTimes++;
}
return this;
}