コード例 #1
0
        public unsafe RenderTarget CreateRenderTarget(int w, int h)
        {
            Texture2d           tex = null;
            var                 rt  = new RenderTarget(this, ResourceIDs.Alloc(ResourceIdManager.EResourceType.RenderTarget), tex);
            int                 id  = rt.Id.ToInt32();
            RenderTargetWrapper rtw = new RenderTargetWrapper(this);

            rtw.Target             = rt;
            ResourceIDs.Lookup[id] = rtw;
            return(rt);
        }
コード例 #2
0
        public IGraphicsControl Internal_CreateGraphicsControl()
        {
            var ret = new GLControlWrapper_GdiPlus(this);

            //create a render target for this control
            RenderTargetWrapper rtw = new RenderTargetWrapper(this);

            rtw.Control             = ret;
            ret.RenderTargetWrapper = rtw;

            return(ret);
        }
コード例 #3
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);
        }
コード例 #4
0
ファイル: IGL_GdiPlus.cs プロジェクト: raiscan/BizHawk
        public void BindRenderTarget(RenderTarget rt)
        {
            if (CurrentRenderTargetWrapper != null)
            {
                if (CurrentRenderTargetWrapper == CurrentControl.RenderTargetWrapper)
                {
                    //dont do anything til swapbuffers
                }
                else
                    CurrentRenderTargetWrapper.MyBufferedGraphics.Render();
            }

            if (rt == null)
            {
                //null means to use the default RT for the current control
                CurrentRenderTargetWrapper = CurrentControl.RenderTargetWrapper;
            }
            else
            {
                CurrentRenderTargetWrapper = RenderTargetWrapperForRt(rt);
                if (CurrentRenderTargetWrapper.MyBufferedGraphics == null)
                    CurrentRenderTargetWrapper.CreateGraphics();
            }
        }
コード例 #5
0
ファイル: IGL_GdiPlus.cs プロジェクト: raiscan/BizHawk
        public IGraphicsControl Internal_CreateGraphicsControl()
        {
            var ret = new GLControlWrapper_GdiPlus(this);

            //create a render target for this control
            RenderTargetWrapper rtw = new RenderTargetWrapper(this);
            rtw.Control = ret;
            ret.RenderTargetWrapper = rtw;

            return ret;
        }
コード例 #6
0
ファイル: IGL_GdiPlus.cs プロジェクト: raiscan/BizHawk
        public unsafe RenderTarget CreateRenderTarget(int w, int h)
        {
            TextureWrapper tw = new TextureWrapper();
            tw.SDBitmap = new Bitmap(w,h, sdi.PixelFormat.Format32bppArgb);
            IntPtr texid = GenTexture();
            ResourceIDs.Lookup[texid.ToInt32()] = tw;
            var tex = new Texture2d(this, texid, null, w, h);

            var rt = new RenderTarget(this, ResourceIDs.Alloc(ResourceIdManager.EResourceType.RenderTarget), tex);
            int id = rt.Id.ToInt32();
            RenderTargetWrapper rtw = new RenderTargetWrapper(this);
            rtw.Target = rt;
            ResourceIDs.Lookup[id] = rtw;
            return rt;
        }
コード例 #7
0
ファイル: IGL_GdiPlus.cs プロジェクト: CadeLaRen/BizHawk
		public unsafe RenderTarget CreateRenderTarget(int w, int h)
		{
			TextureWrapper tw = new TextureWrapper();
			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;
		}
コード例 #8
0
ファイル: IGL_GdiPlus.cs プロジェクト: cas1993per/bizhawk
 public void BindRenderTarget(RenderTarget rt)
 {
     if (rt == null)
     {
         //null means to use the default RT for the current control
         CurrentRenderTargetWrapper = CurrentControl.RenderTargetWrapper;
     }
     else
     {
         CurrentRenderTargetWrapper = RenderTargetWrapperForRt(rt);
     }
 }
コード例 #9
0
ファイル: IGL_GdiPlus.cs プロジェクト: cas1993per/bizhawk
 public unsafe RenderTarget CreateRenderTarget(int w, int h)
 {
     Texture2d tex = null;
     var rt = new RenderTarget(this, ResourceIDs.Alloc(ResourceIdManager.EResourceType.RenderTarget), tex);
     int id = rt.Id.ToInt32();
     RenderTargetWrapper rtw = new RenderTargetWrapper(this);
     rtw.Target = rt;
     ResourceIDs.Lookup[id] = rtw;
     return rt;
 }
コード例 #10
0
 public void Release(RenderTargetWrapper renderTarget)
 {
     TemporaryRenderTargets.Add(renderTarget);
 }