IAssetLoader.ReleaseTexture(string, TextureScaleMode) Method
Definition¶
Namespace: Brine2D.Assets
Decrements the direct-load reference count for the given texture. Each call to GetOrLoadTextureAsync(string, TextureScaleMode, CancellationToken) adds one direct reference; call this method once per load to release it. The texture is unloaded and GPU resources are freed only when both the direct count and all manifest references reach zero. Has no effect if the texture was only loaded via a manifest.
bool ReleaseTexture(string path, Brine2D.Rendering.TextureScaleMode scaleMode=Brine2D.Rendering.TextureScaleMode.Linear);
Parameters¶
path System.String
scaleMode TextureScaleMode
Returns¶
System.Boolean
true if the asset's total reference count reached zero and it was freed;
false if still referenced or not a direct load.