Loading and Rendering a Mesh

1.
Determine the media path.
2.
Declare the mesh variables.
3.
Load the mesh and textures from files.
4.
Render the mesh.

Step 1 is determining the media path. In the included CD, you will notice a Blockers folder in the media folder. This folder includes all the game media, so you need to copy it onto your hard drive somewhere (or use the installation application from the CD). After you copy the media to your hard drive, you need to add an application configuration file to your project, much as you did in previous chapters. Choose Project, Add New Item, and add an application configuration file to your project. Replace the Extensible Markup Language (XML) that was automatically generated with the following:

 <?xml ...

Get Beginning 3D Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.