d3d_set_lighting(enable)
Revision as of 12:57, 29 June 2013 by RobertBColton (talk | contribs)
Description
Sets whether or not to use lighting for rendering with any proceeding draw calls. If you do not set any lights using either d3d light define point or d3d light define direction and then enable them using d3d light enable everything rendered will be black except for the background color, unless of course you change the d3d light define ambient function to use a different color to define darkness than using the default black.
Parameters
Parameter | Data Type | Description |
---|---|---|
enable | boolean | whether or not 3D lighting is currently used when rendering (true or false) |
Return Values
No values are returned from the function.
Example Call
// Demonstrates drawing a cube with the current lighting settings then drawing one without any lighting using the same texture on each cube.
d3d_set_lighting(true);
d3d_draw_block(30, 30, -20, 70, 70, 20, background_get_texture(bg_example), 1, 1);
d3d_set_lighting(false);
d3d_draw_block(-20, -20, -20, 20, 20, 20, background_get_texture(bg_example), 1, 1);