NB. Based on "[Jprogramming] opengl" posts circa Feb 06, 2006
NB. from Brian Schott, Chris Burke and Eric Iverson

require 'opengl ~user/animate/anim.ijs'
coclass 'pgl3test'
coextend 'jgl3 jzopengl panim'

create=: create_panim_ f.

setup=: 3 : 0
  setup_panim_ f. ''
  TITLE=: 'Test'
  MIN=: 0
  MAX=: 90
  DELAY=: 150
  RUN=: 0

  AMBIENT=: 0.15
  DIFFUSE=: 0.7
  SPECULAR=: 0.7
  ROTXYZ=: 40 50 0

  glreset''
  glaRC''
  LISTS=: NURBS=: QUADS=: ''
  glEnable GL_DEPTH_TEST
  glclearcolor CLEARCOLOR
  glcolor COLOR
  stdlistlight''
  genlist 'Box'
  drawcube makelist Box 0 0 1
  f_g_size''
)

step=: 3 : 0
  step_panim_ f. y.
  ROTXYZ=: 360 | 2 3 5*STEP
  startlist LRotate
  stdrotate''
  endlist''
  stdpaint''
  glpaintx''
)

f_g_paint=: stdpaint
f_g_size=: stdsizeaspect


0 : 0 NB. =========================================================
a=: '' conew 'pgl3test'
go__a''
go__a^:10''
step__a 5
)