Beispiel #1
0
        public Texture2d LoadTexture(BitmapBuffer bmp)
        {
            //definitely needed (by TextureFrugalizer at least)
            var sdbmp = bmp.ToSysdrawingBitmap();
            var tw    = new TextureWrapper();

            tw.SDBitmap = sdbmp;
            return(new Texture2d(this, tw, bmp.Width, bmp.Height));
        }
Beispiel #2
0
		public void AddFrame(IVideoProvider source)
		{
			using (var bb = new BitmapBuffer(source.BufferWidth, source.BufferHeight, source.GetVideoBuffer()))
			{
				string subpath = GetAndCreatePathForFrameNum(mCurrFrame);
				string path = subpath + ".png";
				bb.ToSysdrawingBitmap().Save(path, System.Drawing.Imaging.ImageFormat.Png);
			}
		}
Beispiel #3
0
 public void LoadTextureData(Texture2d tex, BitmapBuffer bmp)
 {
     bmp.ToSysdrawingBitmap(BitmapForTexture(tex));
 }
Beispiel #4
0
 public Texture2d LoadTexture(BitmapBuffer bmp)
 {
     //definitely needed (by TextureFrugalizer at least)
     var sdbmp = bmp.ToSysdrawingBitmap();
     IntPtr id = GenTexture();
     var tw = new TextureWrapper();
     tw.SDBitmap = sdbmp;
     ResourceIDs.Lookup[id.ToInt32()] = tw;
     return new Texture2d(this, id, null, bmp.Width, bmp.Height);
 }
Beispiel #5
0
        public void LoadTextureData(Texture2d tex, BitmapBuffer bmp)
        {
            var tw = tex.Opaque as TextureWrapper;

            bmp.ToSysdrawingBitmap(tw.SDBitmap);
        }
Beispiel #6
0
		public Texture2d LoadTexture(BitmapBuffer bmp)
		{
			//definitely needed (by TextureFrugalizer at least)
			var sdbmp = bmp.ToSysdrawingBitmap();
			var tw = new TextureWrapper();
			tw.SDBitmap = sdbmp;
			return new Texture2d(this, tw, bmp.Width, bmp.Height);
		}
Beispiel #7
0
		public void LoadTextureData(Texture2d tex, BitmapBuffer bmp)
		{
			var tw = tex.Opaque as TextureWrapper;
			bmp.ToSysdrawingBitmap(tw.SDBitmap);
		}