Enable or disable lighting. Lighting is enabled by default.

When lighting is enabled you need to use the material function. The color function should be used when lighting is disabled. Additionally, the various geometry functions should be called with the optional style="solid" argument. See the examples section below for examples of rendering with and without lighting.

syntax

lighting(enable)

parameters

enable True or False

examples

draw a solid sphere

def display():
   lighting(True)
   material(1.0, 1.0, 1.0)
   sphere(3.0, style="solid")

draw a wireframe sphere

def display():
   lighting(False)
   color(1.0, 1.0, 1.0)
   sphere(3.0)