Reputation: 33
I'm trying to do a RPG Editor in XNA, the thing is that I need to load the textures from a path written in a XMAL file.
I've done some research, but most of the solutions are changing the content pipeline or simply creating your own.
Upvotes: 3
Views: 5224
Reputation: 1437
Try this:
FileStream filestream = new FileStream("mytexture.jpg");
Texture2D myTexture = Texture2D.FromStream(graphicsDevice, filestream);
Disclaimer: I haven't tested this code (don't have xna installed on this computer).
Upvotes: 4