• Advertisement
Sign in to follow this  

This snippet look right to you?

This topic is 4751 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
As far as I can see a simple
memcpy( m_MeshContainer.pAdjacency, AdjacencyArray, pAdjacencyBuffer->GetBufferSize());
should work as well.

Regards,
Andre

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement