# When to use ofEnableLighting()/ofDisableLighting()?

Hi, I always thought I have to call `ofEnableLighting()/ofDisableLighting()` and `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 `ofEnableLighting();` and `ofDisableLighting();`.

And even if I disable lighting using `ofDisableLighting();`, I could make it enabled again by calling `light.enable();`

So I wonder why we have `ofEnableLighting()/ofDisableLighting()` separately and when to use these instead of `ofLight::enable()/ofLight::disable()`.