Unstable 0.17.0.0

This commit is contained in:
Markus Isberg
2022-02-26 02:43:01 +09:00
parent a83f375681
commit 3974067915
913 changed files with 32472 additions and 32364 deletions
@@ -237,9 +237,17 @@ namespace Microsoft.Xna.Framework.Graphics
void CheckValid(Texture2D texture)
{
if (texture == null)
{
throw new ArgumentNullException("texture");
}
if (texture.IsDisposed)
{
throw new InvalidOperationException($"Texture is disposed");
}
if (!_beginCalled)
{
throw new InvalidOperationException("Draw was called, but Begin has not yet been called. Begin must be called successfully before you can call Draw.");
}
}
void CheckValid(SpriteFont spriteFont, string text)
@@ -315,7 +323,7 @@ namespace Microsoft.Xna.Framework.Graphics
}
}
public void Draw(Texture2D texture, VertexPositionColorTexture[] vertices, float layerDepth)
public void Draw(Texture2D texture, VertexPositionColorTexture[] vertices, float layerDepth, int? count = null)
{
CheckValid(texture);
@@ -338,7 +346,7 @@ namespace Microsoft.Xna.Framework.Graphics
break;
}
int iters = vertices.Length / 4;
int iters = count ?? (vertices.Length / 4);
for (int i=0;i<iters;i++)
{
var item = _batcher.CreateBatchItem();