December 2004
Beginner
432 pages
10h 17m
English
I know you want to get to the fancy 3D graphics being rendered. Doesn't everyone? Even in the wonderful world of game development, you need to learn to walk before you can run (as they say). If you recall from earlier, you declared some variables to keep track of the amount of vertices and faces rendered. This part needs to be reset each frame, so add the code from Listing 11.5 to your OnFrameMove method.
#if (DEBUG)
// Reset the rendering variables in debug mode
numberVerts = 0;
numberFaces = 0;
#endif
if (FrameworkTimer.IsStopped)
return; // Nothing to do
|
Notice that the first thing to do is reset your counters for the number of vertices and frames you've rendered. ...
Read now
Unlock full access