Jump to content
  • Advertisement


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


About to start loading models into game...

This topic is 5619 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''ve never used models in D3D (or at all) before but I need a test vehicle model and wheel models to set up suspension, steering etc as my box with 4 cylinders bug me. I don''t want to do any more work than necessary right now so I presume I''ll be using .X models and the D3DX support library. My question regards their performance - when you tell it to render it presumably goes through each texture used. As models go is D3DX fast or slow? Are there general tips to get model rendering fast, like minimising the number and sizes of textures used? On a side issue, if someone has a low-detail car model (without wheels) and a wheel model in .X format I could test with I''d be very pleased. Just to test but I will put the demo up here at some point so you have to be ok with that. Get your name mentioned in the demo of course (and eventual contributors list in finished game). A few hundred polys at most really - some kind of buggy ideally...

Share this post

Link to post
Share on other sites
D3DX is fast in general, as there is optimized assembly in some functions with separate MMX/D3Now!/SSE codepaths.

When you load a mesh from an .x file, you get a list of materials with a texture name. You then load the texture yourself.
When rendering, you draw each part with mesh->drawsubset() after setting the texture.
If you properly administer it you can make your own list of subsets and textures and go through your meshes sorted by texture, minimizing settexture calls.

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.

GameDev.net 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!