Original Post
well, d3d9 is giving me a lot of hard time. this time, the problem is with how i set the index buffer. one way works, and the other doesnt, although its identical. here is the code -
method A (works) -
short Index[] = {0,3,1,4,2,5,8,4,7,3,6};
int* I;
I = NewMesh->LockIB();
memcpy(I,Index,sizeof(Index));
NewMesh->IB->Unlock();
with this method the whole mesh is drawn correctly.
method B (doesnt work) 0
short Index[] = {0,3,1,4,2,5,8,4,7,3,6};
int* I;
I = NewMesh->LockIB();
for (i=0; i = Index[i];
}
NewMesh->IB->Unlock();
with this method, the mesh isnt drawn correctly.
i dont see the difference. what i really want to do, is to fill the index buffer procedurally, and it is filled correctly, but the mesh is drawn wrong, so i narrowed the bug to differenc between using those two methods, and i cant get the second one to work. and ideas?