[2/5] d3dx9: Implement D3DXMESHOPT_COMPACT for ID3DXMesh::OptimizeInplace.
Matteo Bruni
matteo.mystral at gmail.com
Sun May 8 14:17:44 CDT 2011
2011/5/6 Dylan Smith <dylan.ah.smith at 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?
More information about the wine-devel
mailing list