<div class="gmail_quote">On Sun, May 8, 2011 at 3:17 PM, Matteo Bruni <span dir="ltr"><<a href="mailto:matteo.mystral@gmail.com">matteo.mystral@gmail.com</a>></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 <<a href="mailto:dylan.ah.smith@gmail.com">dylan.ah.smith@gmail.com</a>>:<br>
<br>
...<br>
<div class="im">> + new_vertex_buffer_size = This->numvertices;<br>
</div>...<br>
<div class="im">> + new_vertex_buffer_size *= vertex_size;<br>
> + hr = IDirect3DDevice9_CreateVertexBuffer(This->device, new_vertex_buffer_size,<br>
> + vertex_desc.Usage, This->fvf, vertex_desc.Pool, &vertex_buffer, NULL);<br>
</div>...<br>
<div class="im">+ for (i = 0; i < 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>