• R/O
  • SSH
  • HTTPS

mmdx: Commit


Commit MetaInfo

Revision849 (tree)
Zeit2011-06-12 16:00:06
Autorwilfrem

Log Message

バグとGC対処

Ändern Zusammenfassung

Diff

--- branches/XNA4/MikuMikuDanceXNA/Model/MMDXModel.cs (revision 848)
+++ branches/XNA4/MikuMikuDanceXNA/Model/MMDXModel.cs (revision 849)
@@ -34,9 +34,9 @@
3434 /// <param name="faceManager">表情マネージャ</param>
3535 protected override void SetFace(IMMDFaceManager faceManager)
3636 {
37- foreach (var part in Parts)
37+ for (int i = 0; i < Parts.Count;++i )
3838 {
39- part.SetFace(faceManager);
39+ Parts[i].SetFace(faceManager);
4040 }
4141 }
4242 /// <summary>
@@ -48,8 +48,8 @@
4848 #if !XBOX
4949 System.Threading.Tasks.Parallel.ForEach(Parts, (part) => part.SetSkinMatrix(skinTransforms));
5050 #else
51- foreach (var part in Parts)
52- part.SetSkinMatrix(skinTransforms);
51+ for (int i = 0; i < Parts.Count; ++i)
52+ Parts[i].SetSkinMatrix(skinTransforms);
5353 #endif
5454
5555 }
--- branches/XNA4/MikuMikuDanceXNA/Model/MMDXBoxModelPart.cs (revision 848)
+++ branches/XNA4/MikuMikuDanceXNA/Model/MMDXBoxModelPart.cs (revision 849)
@@ -130,7 +130,7 @@
130130 extVertices[i].FacePtr = extvert[i];
131131 }
132132 //頂点バッファ作成
133- mainVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexPositionNormal), vertices.Length, BufferUsage.WriteOnly);
133+ mainVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexPositionNormalColor), vertices.Length, BufferUsage.WriteOnly);
134134 externaiVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexXBoxExtend), extVertices.Length, BufferUsage.WriteOnly);
135135 //頂点バッファにデータを流しこみ
136136 mainVertexBuffer.SetData(mainVertices);
@@ -212,7 +212,7 @@
212212 extVertices[i].FacePtr = extvert[i];
213213 }
214214 //頂点バッファ作成
215- mainVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexPositionNormal), vertices.Length, BufferUsage.WriteOnly);
215+ mainVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexPositionNormalTexture), vertices.Length, BufferUsage.WriteOnly);
216216 externaiVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexXBoxExtend), extVertices.Length, BufferUsage.WriteOnly);
217217 //頂点バッファにデータを流しこみ
218218 mainVertexBuffer.SetData(mainVertices);
@@ -295,7 +295,7 @@
295295 extVertices[i].FacePtr = extvert[i];
296296 }
297297 //頂点バッファ作成
298- mainVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexPositionNormal), vertices.Length, BufferUsage.WriteOnly);
298+ mainVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexPositionNormalTextureColor), vertices.Length, BufferUsage.WriteOnly);
299299 externaiVertexBuffer = new VertexBuffer(indexBuffer.GraphicsDevice, typeof(VertexXBoxExtend), extVertices.Length, BufferUsage.WriteOnly);
300300 //頂点バッファにデータを流しこみ
301301 mainVertexBuffer.SetData(mainVertices);
--- branches/XNA4/MikuMikuDanceCore/Model/MMDBoneManager.cs (revision 848)
+++ branches/XNA4/MikuMikuDanceCore/Model/MMDBoneManager.cs (revision 849)
@@ -105,9 +105,9 @@
105105 internal void CalcIK()
106106 {
107107 bool UpdateFlag = false;
108- foreach (var ik in IKs)
108+ for (int i = 0; i < IKs.Count; ++i)
109109 {
110- if (MMDCore.Instance.IKSolver.Solve(ik, this))
110+ if (MMDCore.Instance.IKSolver.Solve(IKs[i], this))
111111 UpdateFlag = true;
112112 }
113113 if (UpdateFlag)
--- branches/XNA4/MikuMikuDanceCore/MultiThreads/PhysicsThreadManager.cs (revision 848)
+++ branches/XNA4/MikuMikuDanceCore/MultiThreads/PhysicsThreadManager.cs (revision 849)
@@ -57,9 +57,6 @@
5757 CalcFinished = new AutoResetEvent(true);
5858 CalcStart = new AutoResetEvent(false);
5959 thread = new Thread(new ThreadStart(threadFunc));
60-#if XBOX360
61- thread.SetProcessorAffinity(XboxCoreNum);
62-#endif
6360
6461 thread.Start();
6562 }
@@ -112,6 +109,9 @@
112109
113110 private void threadFunc()
114111 {
112+#if XBOX360
113+ thread.SetProcessorAffinity(XboxCoreNum);
114+#endif
115115 try
116116 {
117117 while (true)
Show on old repository browser