d3d_set_lighting

Enables or disables the use of lighting.

Syntax:

d3d_set_lighting(enable)


Argument Description
enable Turn lighting on (true) or off (false).


Returns: N/A


Description

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.


Example:

d3d_set_lighting(true);

The above code switches on lighting for the 3D scene.


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