<div class="gmail_quote">On Sun, May 8, 2011 at 3:17 PM, Matteo Bruni <span dir="ltr">&lt;<a href="mailto:matteo.mystral@gmail.com">matteo.mystral@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

2011/5/6 Dylan Smith &lt;<a href="mailto:dylan.ah.smith@gmail.com">dylan.ah.smith@gmail.com</a>&gt;:<br>
<br>
...<br>
<div class="im">&gt; +        new_vertex_buffer_size = This-&gt;numvertices;<br>
</div>...<br>
<div class="im">&gt; +        new_vertex_buffer_size *= vertex_size;<br>
&gt; +        hr = IDirect3DDevice9_CreateVertexBuffer(This-&gt;device, new_vertex_buffer_size,<br>
&gt; +                vertex_desc.Usage, This-&gt;fvf, vertex_desc.Pool, &amp;vertex_buffer, NULL);<br>
</div>...<br>
<div class="im">+        for (i = 0; i &lt; new_num_vertices; i++)<br>
+            CopyMemory(new_vertices + i * vertex_size, orig_vertices<br>
+ vertex_remap_ptr[i] * vertex_size, vertex_size);<br>
<br>
</div>Is this correct, i.e. should the new vertex buffer be big as much as<br>
the old one? I expected it to be just big enough to keep all the<br>
remaining vertices (new_num_vertices). Maybe this is so to match some<br>
native behavior?<br>
</blockquote></div><br><div>Ya, I was just trying to match the native behaviour.</div>