[gameprogrammer] Re: engine design, question

On Tue, Feb 21, 2006 at 08:46:42AM -0500, Roger D Vargas wrote:

> Im creating a simple engine for my game client. Im in the process of 
> separating resource loading, scene rendering and map data in different 
> classes.
> I have a doubt, how should I deal with object storage (meshes, texture, 
> etc)? I was thinking to let the resource manager keep a cache of 
> objetcs, but then how to make those objects available to the scene 
> manager for rendering without having to search in the cache?
> A friend recommended me to keep the objects in the resource manager 
> cache and pass a pointer to the scene manager. Is this the best solution?

Seems to be a standard one.  Consider using smart pointers, though, or
else managing lifetime of resource objects might turn out very
difficult.

Also, a commercial engine I'm familiar with solves sharing of geometry
data directly in a scene graph as a form of instancing, without help of
a separate resource manager class.

        latimerius



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: