• Advertisement
Sign in to follow this  

[SOLVED] basic question - load every resource once?

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

Hi, i have a very simple question (at least i think so) but i couldnt figure it out with google. As i code a game i need to use the same objects (meshes) for different "instances" in the world. i only need to load every mesh texture once right ? add a reference counter (if i want to delete objects at runtime) and asign a wrapper class that saves the positioning matrix and other specifics ... is that assumption correct ? mfg flery [Edited by - flery on September 7, 2006 9:42:42 PM]

Share this post


Link to post
Share on other sites
Advertisement
Yes, it's called instancing. The "mesh" is just data that describes how to draw something. You can reference that data to draw that something as many times as you like. Just store a pointer to the mesh data with every object you want to draw, and draw it in the correct position and orientation.

Share this post


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

  • Advertisement