Advertisement
smc_gamer

LoadFromFile

Dec 14th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1.         public static Texture2D LoadFromFile(this Texture2D texture, string path, GraphicsDevice gd)
  2.         {
  3.             using (Stream stream = File.OpenRead(path))
  4.             {
  5.                 return Texture2D.FromStream(gd, stream);
  6.             }
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement