1
我得到了下面的代码在标题中错误:断言错误:_BLOCK_TYPE_IS_VALID(pHead-> nBlockUse)
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;
}
在这行删除[]指数
我不知道为什么我得到它,我不知道我怎么得到它,我可以不明白它吗?
啊,我知道这将是愚蠢的。 – tweetypi 2010-02-05 14:45:16