I don't know whether this is correct or wrong. This is how I load the UVs.
UV = new XMFLOAT2[NumVertices];
for (int i = 0; i < Mesh->GetPolygonCount(); i++)//polygon(=mostly rectangle) count
{
FbxLayerElementArrayTemplate<FbxVector2>* uvVertices = NULL;
Mesh->GetTextureUV(&uvVertices);
for (int j = 0; j < Mesh->GetPolygonSize(i); j++)//retrieves number of vertices in a polygon
{
FbxVector2 uv = uvVertices->GetAt(Mesh->GetTextureUVIndex(i, j));
UV[3*i+j] = XMFLOAT2((float)uv.mData[0], (float)uv.mData[1]);
}
}
How do I correct this? Below image was captured when I was trying to load a texture onto a plane.
↧