home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming for Teens (2nd Edition) / 3DGPFT2E.iso / Source / Chapter05 / demo05-07.bb < prev    next >
Encoding:
Text File  |  2009-01-21  |  604 b   |  29 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. EntityOrder sphere1, -1
  18.  
  19. sphere2=CreateSphere() 
  20. PositionEntity sphere2,0,0,5 
  21. EntityColor sphere2, 21,78,199 
  22.  
  23.  
  24. ; This following code makes our program run 
  25. While Not KeyDown(ESC_KEY)
  26.     RenderWorld 
  27.     Flip
  28. Wend
  29. End