Open pixelnerve opened 7 years ago
Have you allocated the needed memory structures? The doc lacks detail on that. Here is code that works for me:
hr = GetFaceModelTriangleCount((UINT32*)&m_HDFaceModelTriangleCount);
if (SUCCEEDED(hr))
{
m_pHDFaceModelTriangleVertexIndices = (UINT32*)malloc(m_HDFaceModelTriangleCount * 3 * sizeof(UINT32));
if (m_pHDFaceModelTriangleVertexIndices)
{
hr = GetFaceModelTriangles(m_HDFaceModelTriangleCount * 3, m_pHDFaceModelTriangleVertexIndices);
}
else
{
hr = E_OUTOFMEMORY;
}
}
Ah perfect. That works. I was mislead by the function name. Was using triangle count as capacity. Should be triangleCount * 3
Thanks!
This function doesn't seem to work at all. Is there more information about this function ?