我需要用圆形显示图像的纹理,我的代码如下
texture = Texture.FromBitmap(device,myBitmap, Usage.RenderTarget, Pool.Default);
_sprite.Begin(SpriteFlags.SortTexture | SpriteFlags.DoNotModifyRenderState); _sprite.Draw(_allocator.Texture, Vector3.Empty, new Vector3(_objectLocation.X, _objectLocation.Y, 0), RenderingColor); _sprite.End();
但它总是显示矩形纹理,如何将这个纹理剪成圆形。