public void SignalModified() { if (_incompatibleFormatView != null) { TextureCopyUnscaled.Copy(_incompatibleFormatView.Info, _parent.Info, _incompatibleFormatView.Handle, _parent.Handle, 0, FirstLayer, 0, FirstLevel); } }
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); } }
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, ScaleFactor); } TextureCopyUnscaled.Copy(_parent.Info, _incompatibleFormatView.Info, _parent.Handle, _incompatibleFormatView.Handle, FirstLayer, 0, FirstLevel, 0); return(_incompatibleFormatView.Handle); } return(Handle); }