<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/5 Rico Schüller <span dir="ltr"><<a href="mailto:kgbricola@web.de" target="_blank">kgbricola@web.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 05.06.2013 08:48, Christian Costa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
      bone = &This->bones[bone_num];<br>
+    /* Decrement refcounts of vertices previously influenced */<br>
+    for (i = 0; i < bone->num_influences; i++)<br>
+        if (bone->vertices[i] < This->num_vertices) /* Ignore out of range value */<br>
+            This->vertices_refcounts[bone-<u></u>>vertices[i]]--;<br>
      bone->num_influences = num_influences;<br>
      HeapFree(GetProcessHeap(), 0, bone->vertices);<br>
      HeapFree(GetProcessHeap(), 0, bone->weights);<br>
      bone->vertices = new_vertices;<br>
      bone->weights = new_weights;<br>
+    /* Increment refcounts of vertices newly influenced */<br>
+    for (i = 0; i < bone->num_influences; i++)<br>
+    {<br>
+        if (bone->vertices[i] < This->num_vertices) /* Ignore out of range value */<br>
+            This->vertices_refcounts[bone-<u></u>>vertices[i]]--;<br>
+    }<br>
</blockquote>
<br></div>
Please have a look at the code style (brackets {} at the for loops?). It should be a bit more consistent. Also I think an increment (as said in the comment) is something like "This->vertices_refcounts[<u></u>bone->vertices[i]]++;".<br>
</blockquote><div><br></div><div>Oups! It's the wrong patch. I will send an updated version. Thanks!<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Maybe you could add a test to verify if the comment or the code is correct?<br></blockquote><div><br></div><div>Ok. I'll add a basic skinning test. I need one anyway. Vertices skinning is ok but normals one does not look the same as native.<br>
</div><div> </div></div>Christian<br><br></div></div>