Wireframe.htm 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>Wireframe enable</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. enable - True to enable wireframe rendering, False to disable. <br />
  13. <br />
  14. The default Wireframe mode is False.
  15. </td>
  16. </tr>
  17. </table>
  18. <h1>Description</h1>
  19. <table>
  20. <tr>
  21. <td>
  22. Enables or disables wireframe rendering. <br />
  23. <br />
  24. This will show the outline of each polygon on the screen, with no shaded-in areas. <br />
  25. <br />
  26. Wireframe mode should only be used for debugging purposes, as driver support is patchy. For the same reason, no support is offered for the wireframe rendering of individual polygon entities.
  27. </td>
  28. </tr>
  29. </table>
  30. <h1><a href=../3d_examples/Wireframe.bb>Example</a></h1>
  31. <table>
  32. <tr>
  33. <td>
  34. ; Wireframe Example <br />
  35. ; ----------------- <br />
  36. <br />
  37. Graphics3D 640,480,16 <br />
  38. SetBuffer BackBuffer() <br />
  39. <br />
  40. camera=CreateCamera() <br />
  41. <br />
  42. light=CreateLight() <br />
  43. RotateEntity light,90,0,0 <br />
  44. <br />
  45. sphere=CreateSphere( 32 ) <br />
  46. PositionEntity sphere,0,0,2 <br />
  47. <br />
  48. While Not KeyDown( 1 ) <br />
  49. <br />
  50. ; Toggle wireframe enable value between true and false when spacebar is pressed <br />
  51. If KeyHit( 57 )=True Then enable=1-enable <br />
  52. <br />
  53. ; Enable/disable wireframe rendering <br />
  54. WireFrame enable <br />
  55. <br />
  56. RenderWorld <br />
  57. <br />
  58. Text 0,0,"Press spacebar to toggle between Wireframe True/False" <br />
  59. If enable=True Then Text 0,20,"Wireframe True" Else Text 0,20,"Wireframe False" <br />
  60. <br />
  61. Flip <br />
  62. <br />
  63. Wend <br />
  64. <br />
  65. End
  66. </td>
  67. </tr>
  68. </table>
  69. <br>
  70. <a target=_top href=../index.htm>Index</a><br>
  71. <br>
  72. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Wireframe&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  73. </html>