Exemplo n.º 1
0
        public void CopyMultiSample(Texture sourceMsaaTexture, int sourceSubResource, Texture destTexture, int destSubResource, PixelFormat format = PixelFormat.None)
        {
            if (sourceMsaaTexture == null)
            {
                throw new ArgumentNullException("sourceMsaaTexture");
            }
            if (destTexture == null)
            {
                throw new ArgumentNullException("destTexture");
            }
            if (!sourceMsaaTexture.IsMultiSample)
            {
                throw new ArgumentOutOfRangeException("sourceMsaaTexture", "Source texture is not a MSAA texture");
            }

            NativeDeviceContext.ResolveSubresource(sourceMsaaTexture.NativeResource, sourceSubResource, destTexture.NativeResource, destSubResource, (Format)(format == PixelFormat.None ? destTexture.Format : format));
        }