Add ITextureProvider.GetFromManifestResource(Assembly,string)

This commit is contained in:
Soreepeong 2024-02-28 21:04:57 +09:00
parent b52d4724e9
commit cc756c243c
5 changed files with 327 additions and 35 deletions

View file

@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
@ -41,6 +42,12 @@ public partial interface ITextureProvider
/// <returns>The shared texture that you may use to obtain the loaded texture wrap and load states.</returns>
ISharedImmediateTexture GetFromFile(string path);
/// <summary>Gets a shared texture corresponding to the given file of the assembly manifest resources.</summary>
/// <param name="assembly">The assembly containing manifest resources.</param>
/// <param name="name">The case-sensitive name of the manifest resource being requested.</param>
/// <returns>The shared texture that you may use to obtain the loaded texture wrap and load states.</returns>
ISharedImmediateTexture GetFromManifestResource(Assembly assembly, string name);
/// <summary>Gets a texture from the given bytes, trying to interpret it as a .tex file or other well-known image
/// files, such as .png.</summary>
/// <param name="bytes">The bytes to load.</param>