Hi all,
Up until now, I've been programming my little games from scratch everytime i.e. I had no real framework/engine (whatever you want to call it) I could just reuse for every new game. However, the more I get into game dev, the more I'm interested in doing something like an engine. So I started looking around the net and found a few nice sets of tutorials on how to write a basic engine (e.g. from
Innovative Games,
Running on empty...)
The problem I'm having is this. Most of these tutorials have a sort of Actor base class which will handle the drawing of each model. Inside the draw method, the Actor base class will call Mesh.Draw() (the usual Model draw stuff).
Now what if I have a few hundreds Actors? That will give me a few hundred Draw calls...not good.
For the sake of it I made a test: In a small test program I drawed a few hundred cubes. Each cube being drawn by its own DIP call. That crashed performance very badly of course.
I know about instancing and I would really like to implement it (no SM3 card here, so no Hardware instancing). Now my question is: How would I go about clerverly implementing instancing in such an engine? I checked the Instancing Sample but I couldn't figure out a clever method on how to proceed. Maybe my brain is just running slowly and the issue is really easy to handle :-)
Hope someone can give me some directions in this matter