Can an effect technique be called multiple times per begin/end scene?

Started by
1 comment, last by SGreth 18 years, 3 months ago
I'm using an effect/technique to render two seperate objects. The first time I use the shader I bind TextureA to it and draw. The second time I use the shader I bind TextureB and draw. Oddly enough, the textures used for the objects are opposite what I expect them to be. I.E. the first object ends up with TextureB and the first has TextureA. I *could* create a new effect object for every element, but that just seems like a waste. One would think re-binding the texture would work OK. Is that the case? Thanks, ~S'Greth
"The difference between insanity and genius is measured only by success."~Bruce Feirstein
Advertisement
You should be able to use the same technique multiple times with no problems.

Did you remember to call call CommitChanges on the effect before you render?

neneboricua
Bingo! That was it, thanks a bunch. I'm going through converting all my old fixed-function stuff to use the effect framework. It's been going way too smooth until that little kink. If that's the only bump in the road this isn't too bad :)

Thanks again,
~S'Greth
"The difference between insanity and genius is measured only by success."~Bruce Feirstein

This topic is closed to new replies.

Advertisement