set do_init 1
set screen_width 300
set screen_height 300

set xangle -80
set yangle 0
set zangle 0
set frame 0
set fps 0

set name 0

proc reshape {width height} {
  global do_init
  global screen_width
  global screen_height
  global name
  global options

  set screen_width $width
  set screen_height $height

  if {$do_init} {
    set do_init 0

    gl -enable lighting \
       -enable light0 \
       -clearcolor 0 0 0 1 \
       -light light0 spot_direction 0 0 -1 \
       -light light0 ambient 0 0 0 1 \
       -light light0 diffuse 0 0 0 1 \
       -light light0 specular 0 0 0 1
       #-light light0 position 20 20 200 1 \

     gl -genlists name
     change_vehicle_scene $options(vehicle)

     about_page
  }

  gl -viewport 0 0 $width $height
}

proc timer {value} {
  global zangle
  incr zangle
  glut -postredisplay \
       -timerfunc 10 1 {timer $VALUE}
}

glut -keyboardfunc {if {$KEY == 27} exit}
#glut -timerfunc 10 1 {timer $VALUE}
