Skip to main content
gamedev.net
🔒 Locked

[SOLVED] basic question - load every resource once?

Started by flery Sep 7, 2006 at 7:44 PM 1 replies 850+ views
Original Post
flery
flery
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]
smitty1276
smitty1276
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.
flery
flery
thx!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.