Advertisement Jump to content
Sign in to follow this  
Khaos Dragon

OptimizeInplace question

This topic is 4999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if this function will reorder the the adjacency array to correspond to the new ordering of the faces of a mesh. I am wondering this because I was thinking of using the adjacency data to calculate the silhoutte edges of my models.

Share this post

Link to post
Share on other sites
HRESULT OptimizeInplace(
DWORD Flags,
CONST DWORD *pAdjacencyIn,
DWORD *pAdjacencyOut,
DWORD *pFaceRemap,
LPD3DXBUFFER *ppVertexRemap

[out] Pointer to a destination buffer for the face adjacency array of the optimized mesh. The face adjacency is stored as an array of arrays. The innermost array is three indices of adjacent triangles, and the outer array is one set of face adjacency per triangle in the mesh. If the value supplied for this argument is NULL, adjacency data is not returned.

Share this post

Link to post
Share on other sites
Original post by Khaos Dragon
Any known problems if I make the pAdjacencyOut pointer the same as the pAdjacencyIn pointer?

Generally, with D3D and D3DX calls, when there are separate parameters for two different pointers, it is requires that they be different. Otherwise, you usually get a D3DERR_INVALIDCALL returned and some descriptive debug output. It's a safe bet to say it won't work, but it wouldn't hurt to try it [wink]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!