   Effect Parameter Binding
  So in this modern era, what are people generally using for binding effect (shader) parameters to there values? Are people still using Yann L's DLL based approach, deriving from a base class and setting effect parameters to their values in the derived class?  Or are people binding parameters at run time? E.g. detecting at load time that a shader wants a combined WorldViewProj matrix, adding a generic shader parameter object to the effect wrapper, and hooking up a function pointer whose bound function knows how to compute that matrix and set the parameter.  Thus eliminating the need for a specific c++ class implementation for each effect that would need to explicitly the parameters that are needed.[Edited by - Ender1618 on May 20, 2010 12:00:17 AM]
  I personally use the second option: i set my params during runtime and have a custom manager watching over it, to make sure i dont spam my videocard to death.I cache my params in an std::map<std::string, EffectParameter*>, same goes for states but then EffectParameter is called EffectState. During runtime I just do: EffectParam* p = m_params["semantic"]; if(p) ...Did some testing with codeanalyst, and its pretty fast, at least its far far from being a bottleneck, also due to a manager holding watch.   ;  What does your manager actually watch for?   ;  it makes sure i dont set redundant params. i.e. setting the projection or view matrix 50 billion times per frame or per object. because a projection matrix (generally!) doesnt change much.so sending over and/or calculating matrices, transposes and inverses when they've already been set is a bit expensive. so i sacrifice the small check instead :)i'm sure there's better ways, but it works well for me.   