I have a character walk into a house and turn on a light. When the light is turned on there is a very noticeable delay between frames.
At first I just created the light when it was turned on. When that caused the delay I tried creating the light beforehand and then just calling Light::setVisible() when it was turned on. That still causes the delay.
I don't know much about OGRE's internals or 3D graphics in general but I think it might be that a bunch of new shaders need to be created?
What is causing the lag when I create/enable a light and can I do the time-consuming work before hand?