Small ResourceManager refactor, add ResourceSaver<T>.
This commit is contained in:
@@ -3,7 +3,7 @@ using StbImageSharp;
|
||||
|
||||
namespace DaggerFramework
|
||||
{
|
||||
public class Texture2dLoader : IResourceLoader
|
||||
public class Texture2dLoader : IResourceLoader<Texture2d>
|
||||
{
|
||||
public IEnumerable<string> SupportedExtensions => new string[]
|
||||
{
|
||||
@@ -12,9 +12,7 @@ namespace DaggerFramework
|
||||
".jpeg"
|
||||
};
|
||||
|
||||
public Type ResourceType => typeof(Texture2d);
|
||||
|
||||
public Resource Load(string path)
|
||||
public Texture2d Load(string path)
|
||||
{
|
||||
ImageResult image;
|
||||
using (var stream = File.OpenRead(path))
|
||||
@@ -28,10 +26,5 @@ namespace DaggerFramework
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Resource IResourceLoader.Load(string path)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user