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

ID3D10EffectConstantBuffer::SetConstantBuffer

Last post 08-20-2008 3:56 AM by mishak. 2 replies.
  • 08-19-2008 12:20 PM

    ID3D10EffectConstantBuffer::SetConstantBuffer

    When I set up my constant buffer to effect via ID3D10EffectConstantBuffer::SetConstantBuffer, the ID3D10EffectPass::Apply() function stops to update this buffer. Is it default behavior?

    Generally I want to provide my own buffers to effect system(for example cb with material params), and I need to write data to this buffers once at initialization time. Ideal solution could be binding thease buffers to effect via ID3D10EffectConstantBuffer::SetConstantBuffer, and using EffectVaribales and ID3D10EffectPass::Apply() to fill buffers with right data.

    So what me to do?

  • 08-19-2008 6:36 PM In reply to

    Re: ID3D10EffectConstantBuffer::SetConstantBuffer

    So far as I know, using SetConstantBuffer is taking management of that constant buffer out of FX's hands. Can you just move the initializers into your effect source? (ie float4 myCBVal = float4(1,2,3,4);)
  • 08-20-2008 3:56 AM In reply to

    Re: ID3D10EffectConstantBuffer::SetConstantBuffer

    No I can't. I think, In my editor I will copy this constant buffer every time I update an EffectVariable. Later in game, I will set this buffer via SetConstantBuffer. Of course there won't be any material editing capabilities in game :(
Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG