class EffectBase::ApplyShaders should set GS to nullptr


I found problem with EffectBase::ApplyShaders method. I use some effects that use GS and currently I need to set to null GS after every Draw to be sure that effects like BasicEffect are drawn properly.
So I think that effects which don't use GS should set it to null in ApplyShaders method.
Closed Mar 24 at 9:49 PM by walbourn


walbourn wrote Mar 24 at 9:49 PM

Setting unnecessary state can cause performance issues, so I generally go with just documenting the state I use for each component and leave it to the application to decide if extra state should be cleared.

It's also not clear what state is getting used elsewhere. For example, should I be clearing the Hull and Domain shaders every time?

See the wiki