Browse Source

[Collisions] Fix Warning due to obsolete method call.

CartBlanche 2 months ago
parent
commit
29a965323d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Collisions/Core/DebugDraw.cs

+ 2 - 1
Collisions/Core/DebugDraw.cs

@@ -131,7 +131,8 @@ namespace CollisionSample
                 foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
                 foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
                 {
                 {
                     pass.Apply();
                     pass.Apply();
-                    device.DrawIndexedPrimitives(PrimitiveType.LineList, 0, 0, VertexCount, 0, IndexCount / 2);
+                    // Updated to new overload: DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int startIndex, int primitiveCount)
+                    device.DrawIndexedPrimitives(PrimitiveType.LineList, 0, 0, IndexCount / 2);
                 }
                 }
 
 
                 device.SetVertexBuffer(null);
                 device.SetVertexBuffer(null);