ResourceManager!

This commit is contained in:
2023-06-18 22:16:28 +02:00
parent c0bdb3d4a6
commit 2fb5125ece
9 changed files with 215 additions and 22 deletions

View File

@@ -1,10 +1,20 @@
using DaggerFramework.Resources;
using StbImageSharp;
namespace DaggerFramework
{
public class Texture2dLoader : ResourceLoader<Texture2d>
public class Texture2dLoader : IResourceLoader
{
public override Texture2d Load(string path)
public IEnumerable<string> SupportedExtensions => new string[]
{
".png",
".jpg",
".jpeg"
};
public Type ResourceType => typeof(Texture2d);
public Resource Load(string path)
{
ImageResult image;
using (var stream = File.OpenRead(path))
@@ -18,5 +28,10 @@ namespace DaggerFramework
return result;
}
Resource IResourceLoader.Load(string path)
{
throw new NotImplementedException();
}
}
}