Exemplo n.º 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));
        }
Exemplo n.º 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);
			}
		}
Exemplo n.º 3
0
 public void LoadTextureData(Texture2d tex, BitmapBuffer bmp)
 {
     bmp.ToSysdrawingBitmap(BitmapForTexture(tex));
 }
Exemplo n.º 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);
 }
Exemplo n.º 5
0
        public void LoadTextureData(Texture2d tex, BitmapBuffer bmp)
        {
            var tw = tex.Opaque as TextureWrapper;

            bmp.ToSysdrawingBitmap(tw.SDBitmap);
        }
Exemplo n.º 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);
		}
Exemplo n.º 7
0
		public void LoadTextureData(Texture2d tex, BitmapBuffer bmp)
		{
			var tw = tex.Opaque as TextureWrapper;
			bmp.ToSysdrawingBitmap(tw.SDBitmap);
		}