瀏覽代碼

[Collisions] Fix Warning due to obsolete method call.

CartBlanche 2 月之前
父節點
當前提交
29a965323d
共有 1 個文件被更改,包括 2 次插入1 次删除
  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)
                 {
                     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);