XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Question About ID3D10EffectPass

Last post 9/11/2009 7:02 PM by Doug Chism. 2 replies.
  • 9/4/2009 7:40 PM

    Question About ID3D10EffectPass

    If I update a constant buffer, do I need to call ID3D10EffectPass::Apply() again?

    I guess ID3D10EffectPass::Apply() is expensive and I only want to call it if the pass/technique/effect has actually changed, not necessarily if a constant buffer or texture has changed ?

    Doug.
  • 9/9/2009 4:27 PM In reply to

    Re: Question About ID3D10EffectPass

    If you have updated the constant buffer directly don’t need to call apply again. If you have updated the constant buffer with one of the variable interfaces you only have updated the shadow copy of the buffer. Yu need to call Apply to get the values updated on the GPU, too.
  • 9/11/2009 7:02 PM In reply to

    Re: Question About ID3D10EffectPass

    Thanks Ralf.

    Should I plan on calling Apply() after textures change, or is there a direct approach that would avoid this?

    Im thinking along the lines of a multi-subobject mapped mesh, where the technique, pass and all other effect variables are constant, but textures change between draw calls.

    I know the best way to eliminate this is with texture arrays, which would reduce draw calls also - but all in due time ;)
Page 1 of 1 (3 items) Previous Next