Re: D3D9: Rework the converted vertex declaration management (try 3)

2007-04-17 Thread Vitaly Budovski
Stefan � wrote: Another patch which grows by 0.5 * existing size You could as well just grow it to twice the existing size. It would be easier.

Re: D3D9: Rework the converted vertex declaration management (try 3)

2007-04-17 Thread H. Verbeet
On 17/04/07, Stefan Dösinger <[EMAIL PROTECTED]> wrote: This time uses HeapReAlloc, grows the array by 4(defined as a constant). The information from the initial search is used for putting the element into the array. Typically you would grow by a percentage. I think MoveMemory would be preferre

Re: D3D9: Rework the converted vertex declaration management

2007-04-16 Thread Stefan Dösinger
> Growing the array by a single element each time looks a bit expensive. > Also note that you could use HeapReAlloc there. Well, there won't be much growing operation since the number of possible FVF code combinations is limited and I expect all the fvf codes to be used somewhen in the first fram

Re: D3D9: Rework the converted vertex declaration management

2007-04-15 Thread H. Verbeet
On 16/04/07, Stefan Dösinger <[EMAIL PROTECTED]> wrote: I have hope that this fixes the converted decl issues finally(appart of sorting the array, which will be another patch) +convertedDecls = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirect3DVertexDeclaration9 *) * (This->numConvertedDecl