   Copy index buffer from ID3DXMesh to seperate index buffer
  Basically I am trying to load a .X file into a ID3DXMesh, then copy all the information into seperate buffers, i.e. verticies into vertex buffer, tex coords into vertex buffer and indicies into an index buffer.  I am fairly certain I am copying the verticies and texture coordinates correctly, I am just not sure how to do the indicies.  This is how I am copying the indicies now (which is obviously not the right way to do it):typedef struct {short IBNumber[3];} IndexBufferStruct;char *AnimatedMesh1IBPtr, AnimatedMesh1TempIBPtr;AnimatedMesh1->LockIndexBuffer(D3DLOCK_READONLY, (void**)&AnimatedMesh1IBPtr);ModelIB->Lock(0 ,0, (void**)&AnimatedMesh1TempIBPtr, 0);for(DWORD i=0; i < NumberOfTriangles; i++){IndexBufferStruct *AnimatedMesh1IBStruct = (IndexBufferStruct*)AnimatedMesh1IBPtr;IndexBufferStruct *AnimatedMesh1TempIBStruct = (IndexBufferStruct*)AnimatedMesh1TempIBPtr;AnimatedMesh1TempIBStruct->IBNumber[0] = AnimatedMesh1IBStruct->IBNumber[0];AnimatedMesh1TempIBStruct->IBNumber[1] = AnimatedMesh1IBStruct->IBNumber[1];AnimatedMesh1TempIBStruct->IBNumber[2] = AnimatedMesh1IBStruct->IBNumber[2];AnimatedMesh1IBPtr += sizeof(IndexBufferStruct);AnimatedMesh1TempIBPtr += sizeof(IndexBufferStruct);}AnimatedMesh1->UnlockIndexBuffer();ModelIB->Unlock();Thanks,-Chris   
  typedef struct {WORD IBNumber[3];} IndexBufferStruct;IndexBufferStruct  *IBto, *IBfrom;AnimatedMesh1->LockIndexBuffer(D3DLOCK_READONLY, (void**)&IBfrom);ModelIB->Lock(0 ,0, (void**)&IBto, 0);for(DWORD i=0; i < NumberOfTriangles; i++){   IBto = IBfrom;}AnimatedMesh1->UnlockIndexBuffer();ModelIB->Unlock();Of course, this assumes your mesh is using 16 bit indices.;  Thank you very much, worked perfect.-Chris   