Original Post
Here is the code for my vb:
tBSPVertex *m_pVerts;
pDevice->CreateVertexBuffer(m_numOfVerts*sizeof(tBSPVertex), 0, D3DFVF_BSPFACE, D3DPOOL_MANAGED,
&p_VB, NULL);
VOID* pVerticeLock=0;
p_VB->Lock(0, m_numOfVerts*sizeof(tBSPVertex), &pVerticeLock, 0);
memcpy(pVerticeLock, m_pVerts, m_numOfVerts*sizeof(tBSPVertex));
p_VB->Unlock();
And then I render each face like so:
pDevice->SetStreamSource(0, p_VB, 0, sizeof(tBSPVertex)); pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, pFace->startVertIndex, pFace->numOfVerts-2);However nothing shows up on screen. If I change the stream source stride to the size of a face, I get this mutilated object, but I thought I should be doing everything in reference to the vertices and just using the faces to tell me which vertices to load. //------------------------------------------------------------------------------------------------------ The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one." [edited by - Sfpiano on January 18, 2004 12:04:53 PM]