• Advertisement

Archived

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

Have Problem in SetTexture function?

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