public void Present(uint syncInterval, DxgiPresentOptions options, DxgiRect[] dirtyRects, DxgiRect scrollRect, DxgiPoint scrollOffset)
        {
            if (dirtyRects == null)
            {
                throw new ArgumentNullException("dirtyRects");
            }

            var dirtyRectsHandle   = GCHandle.Alloc(dirtyRects[0], GCHandleType.Pinned);
            var scrollRectHandle   = GCHandle.Alloc(scrollRect, GCHandleType.Pinned);
            var scrollOffsetHandle = GCHandle.Alloc(scrollOffset, GCHandleType.Pinned);

            DxgiPresentParameters parameters = new DxgiPresentParameters();

            parameters.DirtyRectsCount = (uint)dirtyRects.Length;
            parameters.DirtyRects      = dirtyRectsHandle.AddrOfPinnedObject();
            parameters.ScrollRect      = scrollRectHandle.AddrOfPinnedObject();
            parameters.ScrollOffset    = scrollOffsetHandle.AddrOfPinnedObject();

            this.swapChain.Present1(syncInterval, options, ref parameters);

            dirtyRectsHandle.Free();
            scrollRectHandle.Free();
            scrollOffsetHandle.Free();
        }
Example #2
0
 public DxgiError Present(int syncInterval, DxgiPresentOptions flags) =>
 base.innerRefT.Present(syncInterval, flags);
 public void Present(uint syncInterval, DxgiPresentOptions options)
 {
     this.swapChain.Present(syncInterval, options);
 }
 public void Present(uint syncInterval, DxgiPresentOptions options)
 {
     this.swapChain.Present(syncInterval, options);
 }
        public void Present(uint syncInterval, DxgiPresentOptions options)
        {
            DxgiPresentParameters parameters = default(DxgiPresentParameters);

            this.swapChain.Present1(syncInterval, options, ref parameters);
        }
        public void Present(uint syncInterval, DxgiPresentOptions options, DxgiRect[] dirtyRects, DxgiRect scrollRect, DxgiPoint scrollOffset)
        {
            if (dirtyRects == null)
            {
                throw new ArgumentNullException("dirtyRects");
            }

            var dirtyRectsHandle = GCHandle.Alloc(dirtyRects[0], GCHandleType.Pinned);
            var scrollRectHandle = GCHandle.Alloc(scrollRect, GCHandleType.Pinned);
            var scrollOffsetHandle = GCHandle.Alloc(scrollOffset, GCHandleType.Pinned);

            DxgiPresentParameters parameters = new DxgiPresentParameters();
            parameters.DirtyRectsCount = (uint)dirtyRects.Length;
            parameters.DirtyRects = dirtyRectsHandle.AddrOfPinnedObject();
            parameters.ScrollRect = scrollRectHandle.AddrOfPinnedObject();
            parameters.ScrollOffset = scrollOffsetHandle.AddrOfPinnedObject();

            this.swapChain.Present1(syncInterval, options, ref parameters);

            dirtyRectsHandle.Free();
            scrollRectHandle.Free();
            scrollOffsetHandle.Free();
        }
        public void Present(uint syncInterval, DxgiPresentOptions options)
        {
            DxgiPresentParameters parameters = default(DxgiPresentParameters);

            this.swapChain.Present1(syncInterval, options, ref parameters);
        }