public static Texture2D CreateTexture(this IImageRead image, GraphicsDevice graphicsDevice) { var size = image.Size; var texture = new Texture2D(graphicsDevice, size.Width, size.Height); texture.SetData(image.AsRgba8888()); return(texture); }
public ISpriteTexture CreateSpriteTexture(IImageRead image) { var size = image.Size; var texture = new Texture2D(_graphicsDevice, size.Width, size.Height); texture.SetData(image.AsRgba8888()); return(new CSpriteTexture(texture)); }