Multiple calls to a shader

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
andrewdfrost
Posts: 13
Joined: Mon Feb 05, 2007 2:05 pm

Multiple calls to a shader

Post 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.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
andrewdfrost
Posts: 13
Joined: Mon Feb 05, 2007 2:05 pm

Post 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.
Post Reply