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