home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming for Teens (2nd Edition) / 3DGPFT2E.iso / Source / Chapter05 / demo05-06.bb < prev    next >
Encoding:
Text File  |  2009-01-21  |  579 b   |  28 lines

  1. ; demo05-06.bb - Creating two sphere without setting order
  2. ; ------------------
  3. Graphics3D 640,480 
  4. SetBuffer BackBuffer()
  5.  
  6. Const ESC_KEY = 1
  7. ; Create camera 
  8. camera = CreateCamera()
  9. ; Create a light 
  10. light = CreateLight()
  11.  
  12. ; Create our spheres
  13. sphere1 = CreateSphere(32) 
  14. sphere2 = CreateSphere(32)
  15. PositionEntity sphere1,-1,0,5 
  16. EntityColor sphere1, 102,23,231
  17.  
  18. sphere2=CreateSphere() 
  19. PositionEntity sphere2,0,0,5 
  20. EntityColor sphere2, 21,78,199 
  21.  
  22.  
  23. ; This following code makes our program run 
  24. While Not KeyDown(ESC_KEY)
  25.     RenderWorld 
  26.     Flip
  27. Wend
  28. End