Skip to content

Mojo graphics canvas beginlighting

mojo:mojo.graphics.Canvas.BeginLighting

Method BeginLighting:Void( )#

Puts the canvas into lighting mode.

While in lighting mode, you can add lights and shadow casters to the cavas using AddLight and AddShadowCaster. Lights and shadows are later rendered by calling EndLighting.

Each call to BeginLighting must be matched with a corresponding call to EndLighting.

The following properties must not be modified while in lighting mode: Viewport, Scissor, AmbientLight. Attempting to modify these properties while in lighting mode will result in a runtime error in debug builds.

The following methods must not be called in lighting mode: Clear, BeginLighting. Attepting to call these methods while in lighting mode will result in a runtime error in debug builds.