예제 #1
0
        internal static Dictionary <string, Texture2D> GetTextures(GraphicsDevice gd, IFileProvider provider)
        {
            var textures = new Dictionary <string, Texture2D>();

            foreach (var f in provider.GetFiles())
            {
                var img = new Bitmap(new MemoryStream(provider.GetData(f)));
                textures.Add(f, DrawingHelper.BitmapToTexture(gd, img));
            }
            return(textures);
        }