I'm having a really hard time grasping these simple little things in D3D. Anywho, why does this work:
and this doesn't:Code:WORD* k = 0; HR(mIB->Lock(0, 0, (void**)&k, 0)); WORD* b = mesh.GetIndexList(); // loop through and put in individually for ( UINT i = 0; i < mesh.GetIndexCount(); ++i ) k[ i ] = b[ i ]; HR(mIB->Unlock());
assuming mesh.GetIndexList() returns a WORD* to an already-prepared array index list. Aren't these doing the same thing or have I got something different wrong altogether?Code:WORD* k = 0; HR(mIB->Lock(0, 0, (void**)&k, 0)); // put in all at once WORD* k = mesh.GetIndexList(); HR(mIB->Unlock());
Thanks.



LinkBack URL
About LinkBacks


