示例#1
0
 public void SignalModified()
 {
     if (_incompatibleFormatView != null)
     {
         TextureCopyUnscaled.Copy(_incompatibleFormatView._info, _parent.Info, _incompatibleFormatView.Handle, _parent.Handle, 0, FirstLayer, 0, FirstLevel);
     }
 }
示例#2
0
        public void CopyTo(ITexture destination, int firstLayer, int firstLevel)
        {
            TextureView destinationView = (TextureView)destination;

            TextureCopyUnscaled.Copy(this, destinationView, firstLayer, firstLevel);

            if (destinationView._emulatedViewParent != null)
            {
                TextureCopyUnscaled.Copy(
                    this,
                    destinationView._emulatedViewParent,
                    destinationView._firstLayer,
                    destinationView._firstLevel);
            }
        }
示例#3
0
        public void CopyTo(ITexture destination, int firstLayer, int firstLevel)
        {
            TextureView destinationView = (TextureView)destination;

            TextureCopyUnscaled.Copy(_info, destinationView._info, Handle, destinationView.Handle, 0, firstLayer, 0, firstLevel);

            if (destinationView._emulatedViewParent != null)
            {
                TextureCopyUnscaled.Copy(
                    _info,
                    destinationView._emulatedViewParent._info,
                    Handle,
                    destinationView._emulatedViewParent.Handle,
                    0,
                    destinationView.FirstLayer,
                    0,
                    destinationView.FirstLevel);
            }
        }
示例#4
0
        public int GetIncompatibleFormatViewHandle()
        {
            // AMD and Intel has a bug where the view format is always ignored,
            // it uses the parent format instead.
            // As workaround we create a new texture with the correct
            // format, and then do a copy after the draw.
            if (_parent.Info.Format != Format)
            {
                if (_incompatibleFormatView == null)
                {
                    _incompatibleFormatView = (TextureView)_renderer.CreateTexture(_info);
                }

                TextureCopyUnscaled.Copy(_parent.Info, _incompatibleFormatView._info, _parent.Handle, _incompatibleFormatView.Handle, FirstLayer, 0, FirstLevel, 0);

                return(_incompatibleFormatView.Handle);
            }

            return(Handle);
        }