Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


mesh optimize!optimize!

This topic is 5415 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

My game demo is not use the ID3DXMesh interface. So I can not call Optimize and OptimizeInplace method and I must optimizing mesh by myself. But, I don''t know what''s the so-called Attibute Tables?? My demo''s mesh is convert from the .3ds file. These only have some vertices and indices data. How get the Attribute Tables and how to use the tables? The important is : how to use the Attributes Tables?

Share this post

Link to post
Share on other sites
The attribute table is an array of dword values, which sets the subset it belongs to for each face (triangle).
So you can fill it with just 0x00000000, in that case a call to drawsubset(0) will just draw the entire mesh. Usually you would set attributes for each texture, If you have a 10-triangle mesh and the first 5 triangles use texture x and the other 5 would use texture y, then your attribute buffer would be (0,0,0,0,0,1,1,1,1,1).
Then you draw it with

But why not load your data into a ID3DXMesh ? you just need to create it with the number of triangles and vertexes, and then fill a vertex buffer, index buffer and attribute buffer and you''re done. Then you can use all the mesh functions.

Share this post

Link to post
Share on other sites
I don''t load my mesh into ID3DXMesh, because I want to know how to draw a 3D model by myself. I hope learn some low-level technique. So, optimize a mesh myself is a compulsory work, it can help me learn more.

(My english is bad, sorry)

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!