我将标题错误列入以下法典:
std::vector<short> GetIndicesFromID3DXMesh(ID3DXMesh* model)
{
//LPVOID * ppData;
DWORD stride = sizeof(short);
BYTE* ibptr = NULL;
short* indices = new short[model->GetNumFaces() * 3];
std::vector<short> copy;
model->LockIndexBuffer(0, (LPVOID*)&indices);
for(size_t i = 0; i < model->GetNumFaces() * 3; i++)
{
copy.push_back(indices[i]);
}
model->UnlockIndexBuffer();
delete []indices;
return copy;
}
删除
我不知道为什么我拿到它,我不知道我是如何拿到的,能否拿到它呢?