Original Post
I have a design dillema which I hope you can assist me with. The challenge is that I have two dynamic geomtries which are updated/changed at different events and also they require different data in order to perform the desired change. For simplicity I would like the general render pipeline to be as clean as possible so that the pipeline can delegate the actual update to the specific object/class. The not so pretty implementation would be an abstract class which delegates the operations, however since the geometries are very unrelated different information is needed, I have tried to list the problem below. There most be a much cleaner way of implementing this. The problem is that some kind of description is needed the way I have implemented it right now but this results in some nasty coupling and also reductant data. class CDGDescriptor{ flags, with typeinfo?? and update data }; class CDynamicGeometry { private: public: virtual void Update(CDGDescriptor& descriptor) //! needed for externall rendering virtual DWORD GetFVF() = 0; virtual IDirect3DVertexBuffer9* GetVertexBuffer() = 0; virtual UINT GetPrimitiveCount() = 0; }