public override Image CloneSameType(PixelFormat fmt, uint width, uint height, uint depth, uint faces, uint mipmaps) { lock (syncRoot) { AssertNotDisposed(); // We clone the same image and the view. TypelessTexture2D baseTexture = texture2D.CloneSameType(fmt, width, height, depth, faces, mipmaps) as TypelessTexture2D; // And create the view (mostDetailed and mipmapCount may be clamped). return(baseTexture.CreateTexture(format, mostDetailedMipmap, mipmapCount)); } }
public override Image CloneSameType(PixelFormat fmt, uint width, uint height, uint depth, uint faces, uint mipmaps) { lock (syncRoot) { AssertNotDisposed(); TypelessTexture2D b = texture.CloneSameType(fmt, width, height, depth, faces, mipmaps) as TypelessTexture2D; if (multisample) { return(new TypelessTexture2DAsRenderTarget(b, format)); } else { return(new TypelessTexture2DAsRenderTarget(b, format, mipmapSlice)); } } }