Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I remember there is a specific function in Direct3D which optimizes a mesh or a 3D object in some way. What is the purpose of this function? How does it reorganize vertices to make it better?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The ID3DXMesh interface had Optimize and OptimizeInPlace methods, which is what I presume you are thinking of. The purpose of these methods was to reorganize the mesh data (vertex buffers, index buffers, et cetera) to improve drawing performance.

The details of the optimization performed depended on various flags you'd specify when you call the function. You can find a list of flags here, which will reveal some of the specifics about the kinds of operations performed.

I'd venture to guess that the specific optimizations weren't documented in detail to allow for flexibility in adjusting them as hardware evolved. However, most of them centered around removing unused or duplicated data (to achieve better bandwidth utilization) and to reorganize the buffers to allow for better cache coherency on the card.

share|improve this answer
    
More on the vertex cache option: tomsdxfaq.blogspot.com/… –  Darth Satan Mar 28 '12 at 20:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.