FNA compat changes: SpriteBatch.Begin & DrawIndexedPrimitives.

This commit is contained in:
Colin McMillen 2021-07-14 16:48:16 -04:00
parent 92ace31d90
commit f6dde30804
2 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ namespace SemiColinGames {
foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) {
pass.Apply();
graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, indices.Length / 3);
graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, indices.Length, 0, indices.Length / 3);
}
}
@ -141,7 +141,7 @@ namespace SemiColinGames {
foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) {
pass.Apply();
graphics.DrawIndexedPrimitives(
PrimitiveType.LineStrip, 0, 0, NUM_EDGE_VERTICES + 1);
PrimitiveType.LineStrip, 0, 0, NUM_EDGE_VERTICES + 1, 0, NUM_EDGE_VERTICES + 1);
}
}
}

View File

@ -109,7 +109,7 @@ namespace SemiColinGames {
// Draw in-world UI on top of everything.
spriteBatch.Begin(
SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, null);
SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, Matrix.Identity);
for (int i = 0; i < world.Player.MaxHealth; i++) {
Vector2 pos = new Vector2(16 + 15 * i, 8);
if (world.Player.Health > i) {