O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wireframe

Every 3D object in your game is made up of triangles and polygons. If you want to see the triangle makeup of any object, you can go into wireframe mode (see Figure 5.18). This is best illustrated by creating a sphere and converting it to wireframe. The command you use for wireframe is simply WireFrame. Here is the code for creating a sphere and then converting it to wireframe:

Figure 5.18. You can see the polygon makeup of your objects by using the WireFrame command.

; This is the code for creating a sphere and making it wireframe
sphere=CreateSphere()
WireFrame sphere

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required