This snippet look right to you?
Its late and I'm out of resources. I can't find anything to tell me one way or the other, but does this code snippet look right to you?
//Grab the adjacency info
DWORD* AdjacencyArray = (DWORD*)pAdjacencyBuffer->GetBufferPointer();
m_MeshContainer.pAdjacency = new DWORD[(pAdjacencyBuffer->GetBufferSize()/4)];
//Copy the adjacency info over
for(DWORD i = 0; i < pAdjacencyBuffer->GetBufferSize()/4; i++)
{
m_MeshContainer.pAdjacency = AdjacencyArray;
}
//Release the adjacency buffer; we no longer need it
pAdjacencyBuffer->Release();
Esentially, all I'm doing is grabbing the adjacency info out of the buffer returned by LoadSkinMesh and sticking it in the DWORD* for adjacency in MeshContainer. Is there a better way? Does this work? Thanks in advance.
As far as I can see a simple
Regards,
Andre
memcpy( m_MeshContainer.pAdjacency, AdjacencyArray, pAdjacencyBuffer->GetBufferSize());
should work as well.Regards,
Andre
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement