Ejemplo n.º 1
0
        public Texture2d LoadTexture(sd.Bitmap bitmap)
        {
            var sdbmp             = (sd.Bitmap)bitmap.Clone();
            GDIPTextureWrapper tw = new GDIPTextureWrapper();

            tw.SDBitmap = sdbmp;
            return(new Texture2d(this, tw, bitmap.Width, bitmap.Height));
        }
Ejemplo n.º 2
0
        public Texture2d LoadTexture(BitmapBuffer bmp)
        {
            //definitely needed (by TextureFrugalizer at least)
            var sdbmp = bmp.ToSysdrawingBitmap();
            var tw    = new GDIPTextureWrapper();

            tw.SDBitmap = sdbmp;
            return(new Texture2d(this, tw, bmp.Width, bmp.Height));
        }
Ejemplo n.º 3
0
        public Texture2d LoadTexture(Bitmap bitmap)
        {
            var sdBitmap          = (Bitmap)bitmap.Clone();
            GDIPTextureWrapper tw = new GDIPTextureWrapper {
                SDBitmap = sdBitmap
            };

            return(new Texture2d(this, tw, bitmap.Width, bitmap.Height));
        }
Ejemplo n.º 4
0
        public unsafe RenderTarget CreateRenderTarget(int w, int h)
        {
            GDIPTextureWrapper tw = new GDIPTextureWrapper();

            tw.SDBitmap = new Bitmap(w, h, sdi.PixelFormat.Format32bppArgb);
            var tex = new Texture2d(this, tw, w, h);

            RenderTargetWrapper rtw = new RenderTargetWrapper(this);
            var rt = new RenderTarget(this, rtw, tex);

            rtw.Target = rt;
            return(rt);
        }