示例#1
0
        public void GetDisplaySurfaceData(DxgiResource3 destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException("destination");
            }

            this.output.GetDisplaySurfaceData1(destination.GetHandle <IDxgiResource>());
        }
        public DxgiResidency[] QueryResourceResidency(DxgiResource3[] resources)
        {
            if (resources == null)
            {
                throw new ArgumentNullException("resources");
            }

            DxgiResidency[] residencies = new DxgiResidency[resources.Length];

            this.device.QueryResourceResidency(
                Array.ConvertAll(resources, t => t.GetHandle<IDxgiResource>()),
                residencies,
                (uint)resources.Length);

            return residencies;
        }
        public void OfferResources(DxgiResource3[] resources, DxgiOfferResourcePriority priority)
        {
            if (resources == null)
            {
                throw new ArgumentNullException("resources");
            }

            this.device.OfferResources(
                (uint)resources.Length,
                Array.ConvertAll(resources, t => t.GetHandle<IDxgiResource>()),
                priority);
        }
        public bool[] ReclaimResources(DxgiResource3[] resources)
        {
            if (resources == null)
            {
                throw new ArgumentNullException("resources");
            }

            bool[] discarded = new bool[resources.Length];

            this.device.ReclaimResources(
                (uint)resources.Length,
                Array.ConvertAll(resources, t => t.GetHandle<IDxgiResource>()),
                discarded);

            return discarded;
        }
        public void GetDisplaySurfaceData(DxgiResource3 destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException("destination");
            }

            this.output.GetDisplaySurfaceData1(destination.GetHandle<IDxgiResource>());
        }