RE: [GD-General] Multiple Inheritance and RTTI
Brought to you by:
vexxed72
From: Gareth L. <GL...@cl...> - 2003-02-06 10:28:41
|
> > > Every frame we quickly cull out any scene nodes that are not visible > > from a camera, and then for each scene node we query to see if they > > implement the IRenderable interface. If they do, they get a render > > call. > > Yes, I envisioned something like that. > > What are the advantages of this approach over just providing > a (possibly > empty) render() in every node type? A virtual call can never > lose to a QI + > test + potential call. It depends on the number of functions you have in the base class. If it's just Render then sure, that's fine. But if you have 4 or 5 functions in each interface and say 20 interfaces in the system ( with an average of 2-3 per concrete object ) that would end up as 100 pure virtual functions, which starts to get messy. |