remove method

WebGLShaderCache remove(
  1. Material material
)

Implementation

WebGLShaderCache remove(Material material) {
  final materialShaders = materialCache[material];
  if(materialShaders != null){
    for (final shaderStage in materialShaders) {
      shaderStage.usedTimes--;

      if (shaderStage.usedTimes == 0) shaderCache.remove(shaderStage.code);
    }
  }

  materialCache.remove(material);

  return this;
}