示例#1
0
        static unsafe IntPtr GetNativePointer(Microsoft.Xna.Framework.Graphics.RenderTarget renderTarget)
        {
            var comPointerField = renderTarget.GetType().GetField("pComPtr", BindingFlags.Instance | BindingFlags.NonPublic);

            Debug.Assert(comPointerField != null);
            var pointer = comPointerField.GetValue(renderTarget);

            return(new IntPtr(Pointer.Unbox(pointer)));
        }
示例#2
0
 public void Reset()
 {
     Root.Children.Remove(backBuffer._renderer.Root);
     _allRenderTargets.Remove(backBuffer);
     backBuffer = new RenderTarget2D(this, Viewport.Width, Viewport.Height, 1, PresentationParameters.BackBufferFormat, RenderTargetUsage.DiscardContents);
     Root.Children.Add(backBuffer._renderer.Root);
     RectangleGeometry r = new RectangleGeometry();
     r.Rect = new Rect(0, 0, Viewport.Width, Viewport.Height);
     Root.Clip = r;
 }
示例#3
0
 public void BindRenderTarget(RenderTarget target)
 {
     throw new System.Exception("The method or operation is not implemented.");
 }