dont write out PNGs

This commit is contained in:
Chris Forbes
2009-11-29 12:09:39 +13:00
parent 52dae08517
commit 92ea168926
3 changed files with 78 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ using System.Drawing;
using System.IO;
using Ijw.DirectX;
using OpenRa.FileFormats;
using System.Drawing.Imaging;
namespace OpenRa.Game.Graphics
{
@@ -27,11 +28,7 @@ namespace OpenRa.Game.Graphics
void Resolve()
{
string filename = string.Format("../../../sheet-{0}.png", suffix++);
bitmap.Save(filename);
using (Stream s = File.OpenRead(filename))
texture = Texture.Create(s, renderer.Device);
texture = Texture.CreateFromBitmap(bitmap, renderer.Device);
}
public Texture Texture