Switches on or off the indexed light.


d3d_light_enable(ind, enable)

Argument Description
ind The index number of the light.
enable Switches on (true) or off (false) the indexed light.

Returns: N/A


This function is used to enable a defined light. When you define a positional or a directional light you must assign it an index number which is then used by this function to switch the light on or off.


d3d_light_define_point(1, 200, 123, 50, c_white);
d3d_light_enable(1, true);

The above code will enable lighting for the whole scene, then define a white light at a specific point in the room space, and finally turn that light on.

Back: 3D Drawing
Next: d3d_light_define_ambient
© Copyright YoYo Games Ltd. 2018 All Rights Reserved