index

Varkon MBS Programmers manual

# light_on - Procedure

## Description

Activates a lightsource. Up to 8 light sources may be active at the same time. light_on() can also be used to set the intensity of a light source or to toggle between static mode or follow_model. In static mode the light does not move when the model is scaled, panned or rotated in the OpenGL window. In follow_model mode the lightsource follows the model.

## Syntax

      light_on(light, intensity, mode);

      int   light;
      float intensity;
      int   mode;

## Principal parameters

light | - Light source number (0-7)

## Optional parameters

intensity | - Light intensity in procent. 0 = No light, 100 = Full strength. Default = 100
mode | - Static = 0, Light source follows model = 1. Default = 0

## Examples

      light_on(1);

Turns on lightsource 1 with default values for strength and mode.

      light_on(0,50,1);

Turns on lightsource 0 with 50% intensity and sets the mode to follow_model.

## Comments

See also:

light_off(), cre_light()

Varkon version 1.19C svn# 97