protected override void InitializeInternal() { // todo: make sure the texture has actually loaded successfully - note that it may not be loading from a regular file, so we can't rely on FileNotFoundException bubbling up; wrap it in a local exception using (var stream = _fileSource.OpenRead()) ShaderResourceView = ShaderResourceView.FromStream(DeviceManager.Device, stream, _fileSource.Size); _descr = ShaderResourceView.ResourceAs <Texture2D>().Description; }