[2/5] d3dx9: Implement D3DXMESHOPT_COMPACT for ID3DXMesh::OptimizeInplace.

Dylan Smith dylan.ah.smith at gmail.com
Sun May 8 14:24:02 CDT 2011


On Sun, May 8, 2011 at 3:17 PM, Matteo Bruni <matteo.mystral at gmail.com>wrote:

> 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?
>

Ya, I was just trying to match the native behaviour.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110508/862c6b0f/attachment.htm>


More information about the wine-devel mailing list