Henri Verbeet wrote:
On 15 September 2010 01:55, Misha Koshelev misha680@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?
Thank you as always for your valuable feedback.
Could you possible clarify your statement "though I wonder if implementing DrawSubset() isn't going to require creating a vertex declaration anyway."
My understanding from http://msdn.microsoft.com/en-us/library/bb205736%28v=VS.85%29.aspx and http://www.xmission.com/~legalize/book/download/19-D3DX%20Mesh%20Objects.pdf is that DrawSubset will simply draw a subset of the triangles in a mesh...
Thank you Misha