/// <summary> /// Forces the last current library to update the image data. /// </summary> public void Update() { if (CurrentLibrary != null) { CurrentLibrary.EndLibrary(this); } CurrentLibrary = null; }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { if (CurrentLibrary != null) { CurrentLibrary.EndLibrary(this); // Asking the last used library to update the instance of TexImage with its last native data. } if (Disposed) { return; } if (DisposingLibrary != null) { DisposingLibrary.Dispose(this); // Asking the library which allocated the memory to free it. } Disposed = true; }