Jump to content
  • Advertisement

Archived

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

PoorMan

How to optimize?

This topic is 6180 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 have build my terrain map using octree using the models from 3DS Max. How can I optimize the speed in drawing? I got my own file format, all the polygon meshes that are connected and using the same material is stored in an array. But because of the octree structure, I need to send the polygons according to the travesal of the octree. Should I make a list and sort all the polygons first before drawing or just send the polygons directly from the travesal? Or should I even sort all the poylgons with the same material first no matter they are connected or not?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
When you traverse, create lists of Indices to the polygons with the same textures. Then, send each of the lists (along with the vertex array list) to a function that draws Vertex Array''s. do a search on google for information on drawing vertex arrays. Anyways, this would do 2 things for you:
A.) You need only change textures when you have to.
B.) To send data for a Vertex Array is very minimal (you just send the pointers!)

The problem with this method is that it takes a bit more memory, and isn''t very flexible (ei, what if you wanted to multi-texture the polygons, and they have different multi-textures).

Billy

ps. I think just sending the polygons directly from the traversal, and only changing states when you have to, would be the best way if you need it flexible.

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!