So I've set up my program, know how to get everything going except for one thing: indices. I've been stumped as to how I retrieve that set of data. Does anyone know what I function I need to get them? Thanks in advance!
Answer
Assuming you're using the latest fbx sdk, read:
Fundamentally, the FBX sdk stores vertex and index data in a way that is not conducive for rendering api requirements in order save on repeated data. We have to construct the vertices themselves. To do this, for each vertex, retrieve the indices (mentioned in the above link), and construct your own 'vertex reference' structure, then store them in an array, and add an index to your index buffer. But before you do that, check to see if past vertices have any duplicated vertices (by comparing indices of the 'vertex reference' structure), in which case, use that index instead.
No comments:
Post a Comment