On 15 September 2010 01:55, Misha Koshelev <misha...@gmail.com> wrote: > + while (count < MAX_FVF_DECL_SIZE && (count == 0 || > declaration[count-1].Stream != 0xFF)) > + { > + count++; > + } ...and similarly you'd want to use D3DXGetDeclLength() here, though I wonder if implementing DrawSubset() isn't going to require creating a vertex declaration anyway.
> + if (!ref) > + { > + if (This->index_buffer) > IDirect3DIndexBuffer9_Release(This->index_buffer); > + if (This->vertex_buffer) > IDirect3DVertexBuffer9_Release(This->vertex_buffer); > + if (This->device) IDirect3DDevice9_Release(This->device); > + HeapFree(GetProcessHeap(), 0, This); > + } In which cases can these be NULL?