Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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:… – Le Comte du Merde-fou Mar 28 '12 at 20:29

Your Answer


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.