Sign in to follow this  
flery

[SOLVED] basic question - load every resource once?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this