Jump to content
  • Advertisement
Sign in to follow this  
noNchaoTic

Face storage...

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

When loading the faces of a model, is it better to use an array for faster linear memory access and risk wasting some memory for smaller models, or better to go with something slower, but make better use of memory (linked list, or STL vector)... cheers all, Ste

Share this post


Link to post
Share on other sites
Advertisement
Could you be more specific about your model specs?
Well, at least for me, a good rule of thumb: don't use STL vectors. Instead, try to store your vertex coordinates within an array, and reference them through its indexes (I've used this for MD2 loading and animation).
Goodbye!

Share this post


Link to post
Share on other sites
well say we wanted to take it to extremes... my biggest model is a character @ 15,000 polys, and i have a crate object which uses 6.

Share this post


Link to post
Share on other sites
Quote:
Original post by noNchaoTic
well say we wanted to take it to extremes... my biggest model is a character @ 15,000 polys, and i have a crate object which uses 6.


How many models? If you have a lot of models, and make one block of memory to use to load them all, then I'd say that's pretty efficient since you are just allocating once, then loading in the data. You avoid a lot of memory fragmentation that might bog your program down if you use a lot of it (down the line)

Since this is also just loading models at some time, I would rather see speed then memory effeicency. I mean unless you are on a platform (such as cell phones) that do not have a lot of memory, taking a bit extra memory for speed would be appreciated by the players in the end [wink]. The standard for memory usage in computers is reaching about 512MB. Not to mention the virtual memory from windows. The small extra overhead of over allocating once to use for all is nothing, IMO.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!