Archived

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

Move the world or the object?

This topic is 6015 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 am working with d3d8, and am wondering how to go about drawing tiles. The way I have it set up right now, I create a new translation matrix into the world transformation matrix for each tile I draw. This currently allows me to set a vertex-buffer once during initialization and not need to change it during rendering. My question is whether it would be faster to recalculate the vertex positions for each tile, thus keeping the world-transformation constant. I will eventually be doing height-mapping and vertex-shading, so I will have to change the v-buffer each tile anyway. Would it still be faster (or at least not slower) to let the computer take care of object to world transformation? THx for any help, Zennehoy

Share this post


Link to post
Share on other sites
Calling DrawPrimitive once per tile is going to kill you. It is horribly slow when you draw just a few triangles. Besides, you would have to change your vertex buffer for each tile drawn to accomodate textures.

Use an index buffer to create a grid deal-thingie. This allows you to only have one vertex per slot in your height map, and only requires you to change one vertex if you wanted to change a height value.

Z.

Share this post


Link to post
Share on other sites