public static void DisposeAll() { while (Resource.resourceList.Count > 0) { Resource res = Resource.resourceList[0]; res.Dispose(); } Resource.resourceList.Clear(); }
public void Make(string [] shadersList) { Queue <Resource> resourceList = new Queue <Resource>(); foreach (string fileName in shadersList) { Resource res = Resource.Get(fileName); Shader shader = ( Shader )( ResourceShader )res; this.AttachShader(shader, false); resourceList.Enqueue(res); } this.LinkProgram(); foreach (Resource res in resourceList) { res.Dispose(); } }