d3d_set_lighting(enable)
| Argument | Description |
|---|---|
| enable | Turn lighting on (true) or off (false). |
Returns: N/A
This function tells GameMaker: Studio to enable lighting. When lighting is enabled, you will need to add lights to the world, otherwise, all the primitives will be black.
d3d_set_lighting(true);
The above code switches on lighting for the 3D scene.