Hi, I always thought I have to call
ofLight::enable()/ofLight::disable() together to make the lighting properly work like the following way. I think I read somewhere that this is the proper way to use lighting in OF.
ofEnableLighting(); light.enable(); ofDrawSphere(ofGetWidth()/2, ofGetHeight()/2, 100); light.disable(); ofDisableLighting();
But I just found out that it seems like it’s works fine even without calling
And even if I disable lighting using
ofDisableLighting();, I could make it enabled again by calling
So I wonder why we have
ofEnableLighting()/ofDisableLighting() separately and when to use these instead of
Thanks in advance.
EDIT: I think the lighting is not completely disabled just by calling ofLight::disable(). When I draw other objects outside lighting area, they also got affected by the lighting. So I guess I have my answer.