Jump to content
  • Advertisement

Archived

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

keroz

Have Problem in SetTexture function?

This topic is 5379 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 create and Render Mesh by ID3DXMesh and DrawSubset() numMesh = 120; for(int i=0;iSetTexture(0,texture); mesh[i].DrawSubset(0); } I set numMesh = 130 Speed is drop from 80 fps to 1 fps I think it happen becaus SetTexture function in for Loop if i want to set many Texture to many mesh in same screen how to manage it

Share this post


Link to post
Share on other sites
Advertisement
Yes, this is a very bad way to do things.

A much better way to do this is to sort your meshes by texture. Set the texture once for the meshes you are about to draw, then draw them, then change to the next texture and draw the meshes for that texture.

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!