Page 1 of 1

Multiple calls to a shader

Posted: Sat Feb 10, 2007 10:26 am
by andrewdfrost
Another newbie question.... :?

I am fairly new to Irrllict and I am still trying to figure out how to use shaders. :?

Is OnSetConstants called once per frame update? Previously I had some MDX code that would set shader constants and update the vertex shader multiple times per frame update. Is it possible to do this?

Apart from the samples there seems to be very little documentation on the architecture of Irrlicht and how each interface behaves with another.

Posted: Mon Feb 12, 2007 12:46 am
by BlindSide
Maybe you can call "render()" more then once? Im not sure if this calls the shaders more than once though...you can never be sure with irrlicht :lol: Also if you need to which pass you are at just pass the shader a variable for the pass number like in a for loop with render() in it or something.

Posted: Mon Feb 12, 2007 7:31 am
by andrewdfrost
Yeah, I tried that and just got a stack overflow, so calling render just sets of a recursive loop. Thanks for your suggestion though.