Some way to get current rendering state.

I didnt find how to get , if its a light rendering or not.For 2D render you need someting like that , beacos why you do need to render light in GUI state? And that is good to find , what light we are processing , maybe someone need that!