You need some raw data models. For example let's consider that you've made a model in blender of a sphere, let's call this sphere_model.
On of your game classes is represented by a brown coloured sphere, the other one is represented by a blue sphere.
You first initialize the brown sphere, the asset manager checks it's cache and sees that the sphere_model hasn't been loaded yet, it loads it for you and returns a pointer to a model primitive to the brown sphere.
The primitive type has a vertex buffer assoctiated and should have some methods to make it actual.
You then initialize the blue sphere, the asset manager sees that the sphere_model has already been loaded and directy returns a pointer to the model primitive.
When drawing the brown sphere, you do something like SetVertexBuffer(my_model_primitive); after that you set the shader options (like colour = brown).
When drawing the blue sphere you do again SetVertexBuffer(my_model_primitive) which sets the same vertex buffer, however by setting different shader options, (like colour, texture, WorldMatrix, etc..) the sphere will look different.
In general proper asset management will need to statisfy the following:
- Content primitives are only loaded once (model files, texture files, sound files)
- Content primitives are mapped to a primitive class, like model_primitive, texture2d, soundEffect, etc...)
- Primitive classes only retain the raw
data, and methods to do something
with this data, like actualizing the
vertex buffer, but don't contain
- Higher level classes contain the
state and use the primitive classes. They can contain (visual) state like scale, tinting, etc..
I hope this makes a bit of sense, feel free to ask more questions!