OpenGLRenderer lighting double buffering problem


I ran into a problem creating an OpenGL scene with lighting enabled and some spotlights placed.

It seems that the lights are enabled only for one of the two buffers. This results in a flickering, because in one frame the objects are light, in the other one they are dark.

I enable lighting and set the parameters in every render cycle.

Does anybody have similar experience or any hints if this could be my fault or a bug in JUCE?

I'm using the latest JUCE version and this happens for me under MacOS, Windows and Linux.



I know nothing about GL lighting, but would be very surprised if this was a juce bug. Much more likely to just be your rendering code that's doing something wrong.

Is it the first buffer or second? Juce does mess with a fair amount of GL state that you'll have to reset.