Hi!
Up until now I've been using OpenTK for rendering where I've been storing my textures in zip archives. This worked perfectly fine until I decided to switch to SFML.Net.
This is my code:
var tex
= new Texture
(loader
.GetResourceAsStream(filename
)); I'm using .NET 4.5's ZipArchive internally. loader is just a small interface I made for it.
With this I'm getting a NotSupportedException: "This stream from ZipArchiveEntry does not support seeking."
So I tried this:
byte[] data
= loader
.GetResourceAsByteArray(filename
); // the array starts with "?PNG", so this is probably not the issue...var tex
= new Texture
(new MemoryStream
(data
)); This one throws a LoadingFailedException: "Failed to load texture from memory."
Using zip files makes everything nice and simple so I'd hate to get rid of it. Is there any other way to do this?
Thanks in advance,
- Lignum