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