  #compact
  $ filename "t.exe"
 'uses rtl64
  uses glTransA

  sub scene(sys hWnd)
  ===================
  '
  PrepareSceneFrame
  StandardLighting li
  TranslucentMaterial  mt,0.5
  '
  'SETUP TEXTURE
  '
  static sys   imgn,res,wi,ht
  if not imgn
    imgn=21
    res=0 'use wi and ht of image
    LoadTexture "../../images/glass.jpg",imgn,res,wi,ht
  end if
  '
  '
  'GLO2 TRANSFORMS
  ----------------
  '/*
  texture imgn
  float ang2,ang3
  sys   i,j,k
  sys   n=8
  float ang=360/n
  float d=tan(rad(90-ang/2))
  k=n\4-n*ang1/360 'Z ORDER FOR PANEL FACED CYLINDER
  for i=0 to <n
    'Z ORDER ROTATING CYLINDRICAL
    j=i+k
    ang2=j*ang
    ang3=mod(ang1+ang2,360) 
    loadidentity
    translatef    0,0,-7
    rotatef       ang3,0,1,0
    translatef    0,0,d
    transformf    v[12],v[112],4
    'NORMAL
    loadidentity
    'rotatef       ang3,0,1,0
    'APPLY NORMAL ADJUSTMENT ONLY TO NEAR FACING PANELS
    if (ang3<=90)or(ang3>=270) then
    '  transformf    v[24],v[124],1,20
    end if
    ColorQuad
  next
  texture 0
  '*/
  ------------------------
  '
  end sub



  MainWindow width,height,WS_OVERLAPPEDWINDOW
