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

  1. ; demo05-03.bb - Creating a bunch of shapes 
  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 and position four different shapes
  13. cone=CreateCone()
  14. PositionEntity cone,-3.5,0,5
  15. cube=CreateCube() 
  16. PositionEntity cube,3,0,5
  17. sphere=CreateSphere() 
  18. PositionEntity sphere,-1.6,0,5
  19. cylinder=CreateCylinder() 
  20. PositionEntity cylinder,0.5,0,5
  21.  
  22.  
  23. ; This following code makes our program run 
  24. While Not KeyDown(ESC_KEY)
  25.     RenderWorld 
  26.     Flip
  27. Wend
  28. End