Advertisement Jump to content
Sign in to follow this  

Mesh OptimizeInPlace problems

This topic is 4905 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 just cannot figure this out still and need help. I have algorithms that generate my vertex and index buffers, and the finished buffers look great drawn using device.DrawIndexedPrimitives. But the second I try to use the EXACT SAME buffers in a mesh object, it goes down the drain. I cannot even get anything to appear on screen without using optimizeinplace, and then when I use optimizeinplace the buffers get completely jacked up into something other than the desired object. Any ideas?

Share this post

Link to post
Share on other sites
Guest Anonymous Poster

Hehe, got it solved! DrawIndexedPrimitive uses an index buffer that I filled with an INTEGER index array.

Mesh.SetIndexBuffer gets crazy with an INTEGER array, and works properly with a SHORT array.


**posted reply so any one else stumbling along with the same shortsight might get a fix

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!