Wireframe.bb 588 B

1234567891011121314151617181920212223242526272829303132
  1. ; Wireframe Example
  2. ; -----------------
  3. Graphics3D 640,480,16
  4. SetBuffer BackBuffer()
  5. camera=CreateCamera()
  6. light=CreateLight()
  7. RotateEntity light,90,0,0
  8. sphere=CreateSphere( 32 )
  9. PositionEntity sphere,0,0,2
  10. While Not KeyDown( 1 )
  11. ; Toggle wireframe enable value between true and false when spacebar is pressed
  12. If KeyHit( 57 )=True Then enable=1-enable
  13. ; Enable/disable wireframe rendering
  14. WireFrame enable
  15. RenderWorld
  16. Text 0,0,"Press spacebar to toggle between Wireframe True/False"
  17. If enable=True Then Text 0,20,"Wireframe True" Else Text 0,20,"Wireframe False"
  18. Flip
  19. Wend
  20. End